> data(ToothGrowth)
> (x <- subset(ToothGrowth, subset=(len==4.2 & supp=="VC")))
len supp dose
1 4.2 VC 0.5
> (y <- subset(ToothGrowth, subset=(len==4.2 & supp=="OJ")))
[1] len supp dose
<0 rows> (or 0-length row.names)
> ddply(x, .(supp), nrow, .drop=FALSE)
supp V1
1 OJ 0
2 VC 1
> ddply(y, .(supp), nrow, .drop=FALSE)
[1] len supp dose
<0 rows> (or 0-length row.names)
[1] supp V1
<0 rows> (or 0-length row.names)
[1] len supp dose
<0 rows> (or 0-length row.names)
Hadley
> --
> You received this message because you are subscribed to the Google Groups
> "manipulatr" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/manipulatr/-/vyvRTWUebcYJ.
> To post to this group, send email to manip...@googlegroups.com.
> To unsubscribe from this group, send email to
> manipulatr+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/manipulatr?hl=en.
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/