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

335,213

Version

4.6.26

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Søren Højsgaard

Last Published

April 9th, 2025

Functions in doBy (4.6.26)

by-transform

Function to make groupwise transformations
by-split

Split a data frame
by-sample

Sampling from a data frame
child_growth

Berkeley Growth Study data
cropyield

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

Cross-validation for list of glm objects
data_breastcancer

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

Convert right hand sided formula to a list
expr_to_fun

Convert expression into function object.
fatacid

Fish oil in pig food
by-subset

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

crimeRate
crimeRate

crimeRate
by-summary

Function to calculate groupwise summary statistics
esticon

Contrasts for lm, glm, lme, and geeglm objects
interaction-plot

Two-way interaction plot
income

income data
descStat

Computing simple descriptive statistics of a numeric vector.
data_budworm

Budworm data
data_personality

Personality traits
linest

Compute linear estimates
codstom

Diet of Atlantic cod in the Gulf of St. Lawrence (Canada)
crickets

crickets data
linest-matrix

Linear estimates matrix
data_mathmark

Mathematics marks for students
data_cad

Coronary artery disease data
is_estimable

Determines if contrasts are estimable.
reciprocal

Reciprocal function
linest-get

Auxillary functions for computing lsmeans, contrasts etc
recodeVar

Recode values of a vector
prostate

Prostate Tumor Gene Expression Dataset
data-wine

Chemical composition of wine
parseGroupFormula

Extract components from a formula with "conditioning bar"
nir_milk

nir_milk
mb_summary

Fast summary of microbenchmark object
ls-means

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

Plot linear model object
split_byrow_bycol

Split matrix or dataframe into list
get_formulas

Get formulas from model_stability_glm_class object
firstlastobs

Locate the index of the first/last unique value
fev

Forced expiratory volume in children
potatoes

Weight and size of 20 potatoes
sub_seq

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

Get response variable from model
recover_pca_data

Recover data from principal component analysis
haldCement

Heat development in cement under hardening.
renameCol

Rename columns in a matrix or a dataframe.
milkman

Milk yield data for manually milked cows.
model_stability_glm

Model stability for glm objects
scale_df

Scaling numerical values
dietox

Growth curves of pigs in a 3x3 factorial experiment
formula_ops

Formula operations and coercion.
section_fun

Section a function and set default values in function
tidy-esticon

Tidy an esticon object
taylor

Taylor expansion (one dimension)
internal

Internal functions for the doBy package
generate_data_list

Generate data list
truncate0

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

Matrix representatation of list of vectors and vice versa
which.maxn

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

shoes
tidy-linest

Tidy a linest object
response_plot

Plot the response variable against the predictor variables.
timeSinceEvent

Calculate "time since event" in a vector.
by-lmby

List of lm objects with a common model
binomial_to_bernoulli_data

Convert binomial data to bernoulli data
add_pred

Add predicted values of different types to dataframe
bquote_fun_list

Backquote a list of functions
add_int

Add interaction columns to data frame
add_resid

Add residuals of different types to dataframe
by-lapply

Formula based version of lapply and sapply
beets

beets data
NIRmilk

NIRmilk
by-order

Ordering (sorting) rows of a data frame
carcass

Lean meat contents of 344 pig carcasses
by_scale

Scale a dataframe or matrix