Learn R Programming

lme4 (version 1.1-35.1)

subbars: "Sub[stitute] Bars"

Description

Substitute the '+' function for the '|' function in a mixed-model formula, recursively (hence the argument name term). This provides a formula suitable for the current model.frame function.

Usage

subbars(term)

Value

the formula with all | operators replaced by +

Arguments

term

a mixed-model formula

See Also

formula, model.frame, model.matrix.

Other utilities: findbars, nobars, mkRespMod, mkReTrms, nlformula.

Examples

Run this code
subbars(Reaction ~ Days + (Days|Subject)) ## => Reaction ~ Days + (Days + Subject)

Run the code above in your browser using DataLab