diet = c(1,1,1,2,2,2,2,2,3,3,3,3) diet = factor(diet) weightgain = c(8,13,9,9,16,21,11,18,15,10,17,6) boxplot(weightgain~diet) summary(aov(weightgain~diet)) treatment = c(1,1,1,1,1,2,2,2,2,2, 3,3,3,3,3,4,4,4,4,4) treatment = factor(treatment) weight = c(1.23,0.42,0.55,0.08,1.25, 0.97,0.96,0.38,0.45,0.97, 0.06,0.53,0.11,0.77,0.81, 0.88,1.43,1.15,1.53,1.21) boxplot(weight~treatment) summary(aov(weight~treatment))