This is a practise presentation using shiny, ggplot and ggvis to explore the ChickWeight dataset.
Unfortunately the interactive shiny/ggvis parts don’t work on github, so this version will just show static images.
The ChickWeight dataset has 578 rows and 4 columns from an experiment on the effect of diet on early growth of chicks.
First we will explore the dataset and then we will compare the effect of diet on chick weight.
summary(cw)
## weight Time Chick Diet
## Min. : 35.0 Min. : 0.00 13 : 12 1:220
## 1st Qu.: 63.0 1st Qu.: 4.00 9 : 12 2:120
## Median :103.0 Median :10.00 20 : 12 3:120
## Mean :121.8 Mean :10.72 10 : 12 4:118
## 3rd Qu.:163.8 3rd Qu.:16.00 17 : 12
## Max. :373.0 Max. :21.00 19 : 12
## (Other):506
## Warning: Can't output dynamic/interactive ggvis plots in a knitr document.
## Generating a static (non-dynamic, non-interactive) version of the plot.
From our quick data exploration we can see that there are:
Over 21 days
## Warning: Can't output dynamic/interactive ggvis plots in a knitr document.
## Generating a static (non-dynamic, non-interactive) version of the plot.
## Diet Num min max mean median sd
## 1 1 16 96 305 177.7500 166.0 58.70207
## 2 2 10 74 331 214.7000 212.5 78.13813
## 3 3 10 147 373 270.3000 281.0 71.62254
## 4 4 9 196 322 238.5556 237.0 43.34775
In conclusion, for a fixed Diet, then #3 would be the best choice if selecting for mass, but if uniformity was the desired outcome, then Diet #4 would be the best choice.
It would be worth investigating whether a diet consisting of Diet #4 for the first 10-12 days followed by Diet #3 leads to an increased yield.
The github repository for this project can be viewed here.
PROJECTS
r ggplot2