INTRODUCTION TO SHINY Shiny is a package from RStudio that can be used to build interactive web pages with RStudio which is is an open source set of integrated tools designed to help you be more productive with R and you can download it from here. Use the examples in this tutorial to “take a […]

# Exercises

## Descriptive Analytics-Part 5: Data Visualisation (Categorical variables)

Descriptive Analytics is the examination of data or content, usually manually performed, to answer the question “What happened?”. In order to be able to solve this set of exercises you should have solved the part 0, part 1, part 2,part 3, and part 4 of this series but also you should run this script which […]

## Basic Tree 1 Exercises

Using the knowledge you acquired in the previous exercises on sampling and selecting(here), we will now go through an entire data analysis process. You will be using what you know as crutches to solve the problems. Don’t worry. It might look intimidating but follow the sequence and you will see that modeling a decision tree […]

## Matrix Vol. 2 Exercises

[For this exercise, first write down your answer, without using R. Then, check your answer using R.] Answers to the exercises are available here. Exercise 1 If M=matrix(c(1:10),nrow=5,ncol=2, dimnames=list(c(‘a’,’b’,’c’,’d’,’e’),c(‘A’,’B’))) What is the value of: M Exercise 2 Consider the matrix M, What is the value of: M[1,] M[,1] M[3,2] M[‘e’,’A’] Exercise 3 Consider the matrix […]

## R-SQL Exercises

How to write Structured Query Language (SQL) code in R. Well there are many packages on CRAN that relate to databases. In the exercises below we cover some of the important data manipulation operations using SQL in R. We will use a ‘sqldf’ package, an R package for running SQL statements on data frames. Answers […]

## Select and Query Exercise

In this exercise we cover the basics on selecting and extracting data using queries. We add a few other materials into it. This should prepare you for the next exercise: Basic Decision Tree. The purpose of this is to give you the 20 percent of the tools to get 80 percent of work done. You […]

## Functions exercises vol. 2

[For this exercise, first write down your answer, without using R. Then, check your answer using R.] Answers to the exercises are available here. Exercise 1 Create a function that given a data frame and a vector, will add a the vector (if the vector length match with the rows number of the data frame) […]

## Descriptive Analytics-Part 5: Data Visualisation (Continuous variables)

Descriptive Analytics is the examination of data or content, usually manually performed, to answer the question “What happened?”. In order to be able to solve this set of exercises you should have solved the part 0, part 1, part 2,part 3, and part 4 of this series but also you should run this script which […]

## Model Evaluation Exercises 1

We are committed to bringing you 100% authentic exercise sets. We even try to include as different datasets as possible to give you an understanding of different problems. No more classifying Titanic dataset. R has tons of datasets in its library. This is to encourage you to try as many datasets as possible. We will […]

## Scripting Loops exercises Vol.2

[For this exercise, first write down your answer, without using R. Then, check your answer using R.] Answers to the exercises are available here. Exercise 1 Using the following variables: x=1 i=c(1:10) For this exercise, write a for() loop that increments x by two for each i. Exercise 2 Using the following variables: x=1 y=40 […]