Learn R Programming

reformulas (version 0.2.0)

subbars: "Substitute bars"

Description

Substitute the '+' function for the '|' and '||' function in a mixed-model formula. This provides a formula suitable for the current model.frame function.

Usage

subbars(term)

Value

the formula with all | and || operators replaced by +

Arguments

term

a mixed-model formula

See Also

formula, model.frame, model.matrix.

Other utilities: mkReTrms(), nobars()

Examples

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

Run the code above in your browser using DataLab