formula_split: Split formula by symbol

View source: R/formula.R

formula_splitR Documentation

Split formula by symbol

Description

This function splits one formula into two formulas by symbol.

Usage

formula_split(formula, symbol = "|")

Arguments

formula

an object of class formula.

symbol

a string that is used to split formula into two formulas.

Details

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

Value

This function returns a list of two formulas.

Examples

formula_split("y ~ x1 + x2 | x2 + x3")
formula_split("y ~ x1 + x2 : x2 + x3", symbol = ":")


switchSelection documentation built on Sept. 26, 2024, 5:07 p.m.