Convert lazy objects into a formula
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.
Examples
formularise(rlang::quo(foo))
#> `~`()
#> <environment: 0x55c19fd956c8>
formularise(rlang::quo(y ~ x))
#> `~`()
#> <environment: 0x55c19fd956c8>
bar <- a ~ b
formularise(rlang::quo(bar))
#> `~`()
#> <environment: 0x55c19fd956c8>