powered by
Combining formulas by + or another operator. This is particularly useful for linking tables in the case of table building with formulas.
+
combine_formulas(lof, operator = "+", simplify = FALSE, env = parent.frame())
model formula
list or vector of formulas to be linked
"+" (default), "*", ":" or another operator
"+"
"*"
":"
logical value, default FALSE. Determines whether the formula should be expanded and simplified before output or not.
the environment for the output formula
Daniel Lupp and Øyvind Langsrud
lof1 <- c(~a+b, ~a:c, ~c*d) combine_formulas(lof1) combine_formulas(lof1, operator = "*") combine_formulas(lof1, simplify = TRUE)
Run the code above in your browser using DataLab