Course Project

Examining Chicken Weights Shiny App Tool

KKParker - 12/24/2015

PURPOSE

Chick Weight Overview

  • The data used for the project is from ChickWeight in base R. The data is processed as follows for this App.
data(ChickWeight) #Records with 3 Study Times (Beg:0, Middle:10, End:21)
df <- ChickWeight[!ChickWeight$Chick %in% c("18", "16", "15", "13", "8","44"),] 
df <- df[df$Time %in% c(0, 10, 21),]
df$StudyTime <- ifelse(df$Time == 0, 1, ifelse(df$Time == 10,2,3))
  • Note that the data tracks Chicks on 4 different diets. You can see the number of Chicks in each Diet
table(df$Diet)
## 
##  1  2  3  4 
## 45 30 30 27
  • The Overview tab shows a line chart of the Chick's weights over time. This gives you an idea of what you might want to compare in the other tabs.

Explore Diets

  • On this tab, you can view line or box plots of the data based on your choice of Diet. This is a box plot.
dfsub <- df[df$Diet==4,]
boxplot(dfsub$weight ~ dfsub$StudyTime,  main="Diet 4",
 ylim=c(0,400), xlab="Study Timeline (1=beg, 2=middle, 3=end)",
 ylab = "Weight of Chick")

plot of chunk unnamed-chunk-3

Test Diets

  • On this tab, you can perform two-sample t tests or ANOVA comparing Diets at a certain Study Time. This shows an example of the ANOVA analysis. plot of chunk unnamed-chunk-4