formula_split {switchSelection}R 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 = ":")


[Package switchSelection version 1.1.2 Index]