doBy: Groupwise Statistics, LSmeans, Linear Contrasts, Utilities

The facilities can roughly be grouped as: . 1) Facilities for groupwise computations of summary statistics and other facilities for working with grouped data: 'do' something to data stratified 'by' some variables. . 2) LSmeans (least-squares means), general linear contrasts. . 3) Miscellaneous other utilities.

Install the latest version of this package by entering the following in R:
AuthorSren Hjsgaard <> and Ulrich Halekoh <>
Date of publication2016-03-31 17:38:50
MaintainerSren Hjsgaard <>
LicenseGPL (>= 2)

View on CRAN

Man pages

createFunBy: A template function for creating groupwise functions

DATA-beets: Yield and sugar percentage in sugar beets from a split plot...

DATA-breastcancer: Gene expression signatures for p53 mutation status in 250...

DATA-budworm: Effect of Insecticide on survivial of tobacco budworms

DATA-carcass: Lean meat contents of 344 pig carcasses

DATA-codstom: Diet of Atlantic cod in the Gulf of St. Lawrence (Canada)

DATA-crimeRate: crimeRate

DATA-dietox: Growth curves of pigs in a 3x3 factorial experiment

DATA-haldCement: Heat development in cement under hardening.

DATA-milkman: Milk yield data for manually milked cows.

DATA-NIRmilk: NIRmilk

DATA-potatoes: Weight and size of 20 potatoes

descStat: Computing simple descriptive statistics of a numeric vector.

doBy: Various utilitie. Functions for creating groupwise...

doBy-internal: Internal functions for the doBy package

esticon: Contrasts for lm, glm, lme, and geeglm objects

firstlastobs: Locate the index of the first/last unique value

is_estimable: Determines if contrasts are estimable.

lapplyBy: Formula based version of lapply

linest: Compute linear estimates

lmBy: List of lm objects with a common model

LSmeans: Compute linear estimates, including LS-means (aka population...

null_basis: Finds the basis of the (right) null space.

orderBy: Ordering (sorting) rows of a data frame

parseGroupFormula: Extract components from a formula with "conditioning bar"

recodeVar: Recode values of a vector

renameCol: Rename columns in a matrix or a dataframe.

sampleBy: Sampling from a data frame

scaleBy: Groupwise scaling and centering of numeric columns in a...

splitBy: Split a data frame

subSeq: Find sub-sequences of identical elements in a vector.

subsetBy: Finds subsets of a dataframe which is split by variables in a...

summaryBy: Function to calculate groupwise summary statistics

timeSinceEvent: Calculate "time since event" in a vector.

transformBy: Function to make groupwise transformations

which.maxn: Where are the n largest or n smallest elements in a numeric...


asNumericMatrix2 Man page
beets Man page
breastcancer Man page
budworm Man page
carcass Man page
carcassall Man page
codstom Man page
coef.lmBy Man page
coef.summary_lmBy Man page
createFunBy Man page
crimeRate Man page
descStat Man page
dietox Man page
doBy Man page
doby.xtabs Man page
esticon Man page
esticon.coxph Man page
esticon.geeglm Man page
esticon.glm Man page
esticon.gls Man page
esticon.lm Man page
esticon.lme Man page
esticon.mer Man page
esticon.merMod Man page
firstobs Man page
firstobs.default Man page
firstobs.formula Man page
fitted.lmBy Man page
formulaFunBy Man page
funBy Man page
getBy Man page
get_contrasts Man page
get_contrasts.default Man page
get_contrasts.merMod Man page
get_null_basis.default Man page
get_null_basis.matrix Man page
get_null_basis.Matrix Man page
get_vartypes Man page
get_X Man page
get_X.default Man page
get_xlevels Man page
get_xlevels.default Man page
get_xlevels.mer Man page
get_xlevels.merMod Man page
get_X.merMod Man page
haldCement Man page
HTMLCommand2 Man page
HTMLdefault2 Man page
internal Man page
is_estimable Man page
lapplyBy Man page
lastobs Man page
lastobs.default Man page
lastobs.formula Man page
linest Man page
linest.default Man page
linest.geeglm Man page
linest.glm Man page
linest.lm Man page
linest.lmerMod Man page
linestMatrix Man page
linestMatrix.default Man page
linest.merMod Man page
lmBy Man page
LSmatrix Man page
LSmatrix-class Man page
LSmatrix.default Man page
LSmeans Man page
LSmeans.default Man page
LSmeans.geeglm Man page
LSmeans.glm Man page
LSmeans.lm Man page
LSmeans.lmerMod Man page
LSmeans.merMod Man page
matrix2dataFrame2 Man page
milkman Man page
NIRmilk Man page
null_basis Man page
nullBasis Man page
nullBasis.geeglm Man page
nullBasis.glm Man page
nullBasis.lm Man page
nullBasis.lmerMod Man page
nullBasis.matrix Man page
nullBasis.Matrix Man page
orderBy Man page
parseGroupFormula Man page
pdiff Man page
popMeans Man page
popMeans.default Man page
popMeans.lmerMod Man page
potatoes Man page
print.linearEstimate Man page
print.linest Man page
print.linestMatrix Man page
print.lmBy Man page
print.LSmatrix Man page
print.splitByData Man page
print.summary_lmBy Man page
recodeVar Man page
renameCol Man page
residuals.lmBy Man page
RweaveHTML2 Man page
RweaveHTMLreport Man page
RweaveHTMLreportFinish Man page
RweaveHTMLreportSetup Man page
RweaveHTMLreportWritedoc Man page
RweaveHTMLRuncode2 Man page
sampleBy Man page
scaleBy Man page
set_covariate_val Man page
set_xlevels Man page
specialize Man page
splitBy Man page
subsAttr2 Man page
subSeq Man page
subsetBy Man page
summaryBy Man page
summary.lmBy Man page
timeSinceEvent Man page
transformBy Man page
which.maxn Man page
which.minn Man page
xyFunBy Man page


R/linestGet.R R/BY-funBy.R R/dobyxtabs.R R/specialize.R R/firstlastObs.R R/BY-subsetBy.R R/recodeVar.R R/BY-lapplyBy.R R/renameCol.R R/HmiscStuff.R R/BY-splitBy2.R R/subSeq.R R/timeSinceEvent.R R/linest.R R/descStat.R R/BY-summaryBy2.R R/BY-orderBy.R R/BY-sampleBy.R R/which.maxn.R R/linestLSmatrix.R R/BY-transformBy.R R/BY-lmBy.R R/linestUtilities.R R/esticon.R R/BY-scaleBy2.R
man/orderBy.Rd man/DATA-NIRmilk.Rd man/DATA-carcass.Rd man/timeSinceEvent.Rd man/null_basis.Rd man/doBy.Rd man/subSeq.Rd man/sampleBy.Rd man/renameCol.Rd man/scaleBy.Rd man/summaryBy.Rd man/doBy-internal.Rd man/DATA-potatoes.Rd man/firstlastobs.Rd man/lmBy.Rd man/transformBy.Rd man/LSmeans.Rd man/DATA-haldCement.Rd man/DATA-dietox.Rd man/descStat.Rd man/recodeVar.Rd man/DATA-crimeRate.Rd man/lapplyBy.Rd man/DATA-beets.Rd man/esticon.Rd man/linest.Rd man/subsetBy.Rd man/which.maxn.Rd man/createFunBy.Rd man/splitBy.Rd man/is_estimable.Rd man/parseGroupFormula.Rd man/DATA-breastcancer.Rd man/DATA-codstom.Rd man/DATA-milkman.Rd man/DATA-budworm.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.