Learn R Programming

doBy

Groupwise Statistics, LSmeans, Linear Contrasts, Utilities

  1. Facilities for working with grouped data: 'do' something to data stratified 'by' some variables.
  2. LSmeans (least-squares means), general linear contrasts.
  3. Miscellaneous utilities
  4. Miscellaneous datasets

Author: Søren Højsgaard, Ulrich Halekoh

Online documentation

https://hojsgaard.github.io/doBy

Development site

https://github.com/hojsgaard/doBy

CRAN page:

https://cran.r-project.org/web/packages/doBy/index.html

Further info at:

http://people.math.aau.dk/~sorenh/software/doBy/

Copy Link

Version

Install

install.packages('doBy')

Monthly Downloads

348,257

Version

4.6.27

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Søren Højsgaard

Last Published

May 16th, 2025

Functions in doBy (4.6.27)

by-transform

Function to make groupwise transformations
by-sample

Sampling from a data frame
codstom

Diet of Atlantic cod in the Gulf of St. Lawrence (Canada)
by-split

Split a data frame
by-summary

Function to calculate groupwise summary statistics
.rhsf2list

Convert right hand sided formula to a list
data_mathmark

Mathematics marks for students
fatacid

Fish oil in pig food
crimeRate

crimeRate
expr_to_fun

Convert expression into function object.
child_growth

Berkeley Growth Study data
data_cad

Coronary artery disease data
formula_ops

Formula operations and coercion.
cv_glm_fitlist

Cross-validation for list of glm objects
generate_data_list

Generate data list
dietox

Growth curves of pigs in a 3x3 factorial experiment
internal

Internal functions for the doBy package
cropyield

Yield from Danish agricultural production of grain and root crop.
mb_summary

Fast summary of microbenchmark object
prostate

Prostate Tumor Gene Expression Dataset
nir_milk

nir_milk
section_fun

Section a function and set default values in function
model_stability_glm

Model stability for glm objects
milkman

Milk yield data for manually milked cows.
crime_rate

crimeRate
set_list_set_matrix

Matrix representatation of list of vectors and vice versa
recover_pca_data

Recover data from principal component analysis
firstlastobs

Locate the index of the first/last unique value
recodeVar

Recode values of a vector
data_breastcancer

Gene expression signatures for p53 mutation status in 250 breast cancer samples
fev

Forced expiratory volume in children
data_budworm

Budworm data
esticon

Contrasts for lm, glm, lme, and geeglm objects
data-wine

Chemical composition of wine
data_personality

Personality traits
plot_lm

Plot linear model object
get_formulas

Get formulas from model_stability_glm_class object
haldCement

Heat development in cement under hardening.
linest-get

Auxillary functions for computing lsmeans, contrasts etc
pick_elements

Extract (pick) elements without using brackets
is_estimable

Determines if contrasts are estimable.
parseGroupFormula

Extract components from a formula with "conditioning bar"
linest

Compute linear estimates
shoes

shoes
linest-matrix

Linear estimates matrix
which.maxn

Where are the n largest or n smallest elements in a numeric vector ?
potatoes

Weight and size of 20 potatoes
response

Get response variable from model
tidy-esticon

Tidy an esticon object
scale_df

Scaling numerical values
descStat

Computing simple descriptive statistics of a numeric vector.
sub_seq

Find sub-sequences of identical elements in a vector.
rbind_list

Bind list of data frames and add list names as a column
interaction-plot

Two-way interaction plot
taylor

Taylor expansion (one dimension)
renameCol

Rename columns in a matrix or a dataframe.
income

income data
ls-means

Compute LS-means (aka population means or marginal means)
reciprocal

Reciprocal function
response_plot

Plot the response variable against the predictor variables.
timeSinceEvent

Calculate "time since event" in a vector.
math_teachers

Height of math teachers
tidy-linest

Tidy a linest object
split_byrow_bycol

Split matrix or dataframe into list
truncate0

Truncate values in a matrix / vector to zero if they are below a certain threshold.
beets

beets data
add_resid

Add residuals of different types to dataframe
bquote_fun_list

Backquote a list of functions
add_pred

Add predicted values of different types to dataframe
binomial_to_bernoulli_data

Convert binomial data to bernoulli data
add_int

Add interaction columns to data frame
by_scale

Scale a dataframe or matrix
by-lmby

List of lm objects with a common model
by-order

Ordering (sorting) rows of a data frame
NIRmilk

NIRmilk
by-lapply

Formula based version of lapply and sapply
by-subset

Finds subsets of a dataframe which is split by variables in a formula.
carcass

Lean meat contents of 344 pig carcasses
crickets

crickets data