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.
Functions summaryBy, splitBy, orderBy, sampleBy, transformBy etc. are the doBy functions.
linest()
calculates linear estimates based on a matrix for
various model objects. The esticon()
function has a similar
functionality, but it will be removed at some point of time.
LSmeans()
and LSmatrix()
are used in connection with
calculating least–squares means.
There are various other utility functions in the package.
Søren Højsgaard, sorenh@math.aau.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)