Create a formula

new_formula(lhs, rhs, env = caller_env())

Arguments

lhs, rhs

A call, name, or atomic vector.

env

An environment.

Value

A formula object.

See also

Examples

new_formula(quote(a), quote(b))
#> a ~ b #> <environment: 0x42cb7c0>
new_formula(NULL, quote(b))
#> ~b #> <environment: 0x42cb7c0>