rhs: Extract lhs and rhs from formula

Description Usage Arguments Value Examples

Description

Extract lhs and rhs from formula

Usage

1
2
3
rhs(formula, output = c("call", "character", "expression", "formula"))

lhs(formula, output = c("call", "character", "expression", "formula"))

Arguments

formula

a formula to extract a side from

output

a character designing the type of output

Value

an object whose type depends on the output parameter

Examples

1
2
3
4
5
6
7
8
9
x <- list(foo = bar$baz) ~ qux +quux
rhs(x,"call")
rhs(x,"character")
rhs(x,"expression")
rhs(x,"formula")
lhs(x,"call")
lhs(x,"character")
lhs(x,"expression")
lhs(x,"formula")

moodymudskipper/mmmd documentation built on May 15, 2019, 9:14 p.m.