ADD CONTROL WIDGETS In the second part of our series you will see how to add control widgets in your Shiny app. Widget is a web element that your users can interact with. The widgets provided by Shiny are: FUNCTIONS actionButton: Action Button checkboxGroupInput: A group of check boxes checkboxInput: A single check box dateInput: […]

## Basic Tree 2 Exercises

This is a continuation of the exercise Basic Tree 1 Answers to the exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page. Exercise 1 load the tree library. If it is not installed […]

## Hierarchical Clustering exercises (beginner)

Grouping objects into clusters is a frequent task in data analysis. In this set of exercises we will use hierarchical clustering to cluster European capitals based on their latitude and longitude. Before trying out this exercise please make sure that you are familiar with the following functions: dist, hlcust, cutree, rect.hclust We will be using […]

## Recursive Partitioning and Regression Trees Exercises

[For this exercise, we will work using the package rpart. This is a beginner level exercise. Please refer to the help of rpart package] Answers to the exercises are available here. Exercise 1 Consider the Kyphosis data frame(type help(‘kyphosis’) for more details), that contains: -Kyphosis:a factor with levels absent present indicating if a kyphosis (a […]

## Building Shiny App exercises part 1

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 […]

## Bonus: Text mining and wordclouds

We just added this week’s set of bonus exercises! Bonus exercises are weekly exercises sets, available to subscribers to our weekly newsletter. Please sign up using the form on the right, and receive further details by email how to download the bonus exercises (and solutions, of course). This week’s bonus exercises focus on the tm […]

## 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 […]