doBy {doBy} | R Documentation |
The core doBy functions were developed to make it easy to split data into groups (defined by the levels of a set of factors) and performing some actions on each of these groups. Thus, these functions mimic what can be achieved using the BY statement in various SAS procedures.
In addition hereto the doBy package containts various other utilities.
Søren Højsgaard, sorenh@agrsci.dk
summaryBy
,
orderBy
,
transformBy
,
splitBy
,
sampleBy
data(dietox) summaryBy(Weight+Feed~Evit+Cu+Time, data=dietox, FUN=c(mean,var), na.rm=TRUE, use="pair") orderBy(~Time+Evit, data=dietox) splitBy(formula = ~Evit+Cu, data = dietox) sampleBy(formula = ~Evit+Cu, frac=.1, data = dietox)