### apply
### sapply
> sapply(ChickWeight[,c(1,2)], mean, na.rm=T)
> sapply(ChickWeight[,c(1,2)], summary)
### tapply
tapply(ChickWeight$weight, ChickWeight$Diet, mean)
tapply(ChickWeight$weight, ChickWeight[,c(2,4)], mean)
coplot(weight ~ Time | Chick, data = ChickWeight, type = "b", show = FALSE)
coplot(weight ~ Time | Diet, data = ChickWeight, type = "b", show = FALSE)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment