formularise: Convert lazy objects into formulas

Description Usage Arguments Details Value Examples

View source: R/formulas.R

Description

Convert lazy objects into a formula

Usage

1
formularise(lazy_formula, envir = parent.frame())

Arguments

lazy_formula

an object of class lazy

envir

an environment that will be come the environment of the returned formula

Details

The expression of the lazy object is evaluated in its environment. If the result is not a formula, then the formula is created with an empty left hand side and the expression on the right hand side.

Value

a formula

Examples

1
2
3
4
formularise(rlang::quo(foo))
formularise(rlang::quo(y ~ x))
bar <- a ~ b
formularise(rlang::quo(bar))

mosaicCore documentation built on Jan. 16, 2021, 5:32 p.m.