rdsn
October, 23rd, 2015
Create a shiny app with associated support documentation and deploy it on RStudio's shiny server. This shiny application must contain some widgets, make some operation on inputs and display the result as outputs, and include some documentation
Create a Slidify or RStudio Presentation in 5 slides. This presentation must be hosted in GitHub or RPubs, and contain some embedded R code.
This application is based on mtcars database available directly in R using the call data(mtcars).
Source code is available on GitHub.
This app is designed to show you the linear or non linear relationship between several variables extracted from the mtcars dataset. From the left side panel, you can select the variables you want to see on the scatterplot in the x Axis and in the Y axis (you can choose between 4 variables). You can also change the number of observations you want to take into account by using the slider.
Plot tab : this tab shows the scatterplot between the 2 x and y variables you have selected in the left side panel and the linear model fitted for those 2 variables and for the number of observations selected.
Fit Summary tab : you can fin here a summary of the linear model that has been fitted in regard of the parameters you have choosen.
Dataset tab : you can have a look at the whole dataset, which is truncated in regard of the number of observations you have selected with the slider on the left side panel.
The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models).
data(mtcars)
head(mtcars[,c("mpg","disp","wt","hp")],5)
mpg disp wt hp
Mazda RX4 21.0 160 2.620 110
Mazda RX4 Wag 21.0 160 2.875 110
Datsun 710 22.8 108 2.320 93
Hornet 4 Drive 21.4 258 3.215 110
Hornet Sportabout 18.7 360 3.440 175
Extract from the dataset for the 4 variables taken into account in the app