manip-formula.Rdsimplify.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 ^.
simplify.formula(x)
expand.formula(x)formulastats
delete.response, drop.terms, and reformulate
simplify.formula(y ~ a + b + a:b + (c + b)^2)
#> y ~ a * b + b * c
#> <environment: 0x55cba8790450>
simplify.formula(y ~ a + b + a:b + 0)
#> y ~ a * b - 1
#> <environment: 0x55cba8790450>
expand.formula(~ a * b)
#> ~a + b + a:b
#> <environment: 0x55cba8790450>