formula_include_hierarchies {SSBtools} | R Documentation |
Replace variables in formula with sum of other variables
Description
Replace variables in formula with sum of other variables
Usage
formula_include_hierarchies(
f,
hier_vars,
simplify = TRUE,
env = parent.frame()
)
Arguments
f |
model formula |
hier_vars |
named list. the names of |
simplify |
logical value, default TRUE. Determines whether the formula should be simplified before output or not. |
env |
the environment for the output formula |
Value
model formula
Author(s)
Daniel Lupp
Examples
f2 <- formula_from_vars(c("a", "b", "c"), c("a", "c"))
formula_include_hierarchies(f2, list(a = c("hello", "world")),
simplify = FALSE)
[Package SSBtools version 1.5.5 Index]