Formula manipulation {MuMIn} | R Documentation |
Manipulate model formulas
Description
simplify.formula
rewrites a formula
into shorthand notation.
Currently only the factor crossing operator *
is applied, so an
expanded expression such as a+b+a:b
becomes a*b
.
expand.formula
does the opposite, additionally expanding other
expressions, i.e. all nesting (/
), grouping and ^
.
Usage
simplify.formula(x)
expand.formula(x)
Arguments
x |
a |
Author(s)
Kamil BartoĊ
See Also
delete.response
, drop.terms
, and
reformulate
Examples
simplify.formula(y ~ a + b + a:b + (c + b)^2)
simplify.formula(y ~ a + b + a:b + 0)
expand.formula(~ a * b)
[Package MuMIn version 1.48.4 Index]