formula_split function

Split formula by symbol

Split formula by symbol

This function splits one formula into two formulas by symbol.

formula_split(formula, symbol = "|")

Arguments

  • formula: an object of class formula.
  • symbol: a string that is used to split formula into two formulas.

Returns

This function returns a list of two formulas.

Details

The symbol should be on the right hand side of the formula.

Examples

formula_split("y ~ x1 + x2 | x2 + x3") formula_split("y ~ x1 + x2 : x2 + x3", symbol = ":")
  • Maintainer: Bogdan Potanin
  • License: GPL (>= 2)
  • Last published: 2024-09-26

Useful links