Split formula by symbol
This function splits one formula into two formulas by symbol.
formula_split(formula, symbol = "|")
formula
: an object of class formula
.symbol
: a string that is used to split formula
into two formulas.This function returns a list of two formulas.
The symbol
should be on the right hand side of the formula.
formula_split("y ~ x1 + x2 | x2 + x3") formula_split("y ~ x1 + x2 : x2 + x3", symbol = ":")
Useful links