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

new_quosure()

Examples

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