- with(ToothGrowth,
- {
- table(supp, dose)
- aggregate(len, by=list(supp, dose), FUN=mean)
- aggregate(len, by=list(supp, dose), FUN=sd)
- fit1<-aov(len~ supp*dose)
- summary(fit1)
- }
- )
- Df Sum Sq Mean Sq F value Pr(>F)
- supp 1 205.3 205.3 12.317 0.000894 ***
- dose 1 2224.3 2224.3 133.415 < 2e-16 ***
- supp:dose 1 88.9 88.9 5.333 0.024631 *
- Residuals 56 933.6 16.7
- ---
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1