Learn R Programming

mosaic (version 0.14.4)

formularise: Convert lazy objects into formulas

Description

Convert lazy objects into a formula

Usage

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

Value

a 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

Run this code
# NOT RUN {
formularise(lazyeval::lazy(foo))
formularise(lazyeval::lazy(y ~ x))
bar <- a ~ b
formularise(lazyeval::lazy(bar))
# }

Run the code above in your browser using DataLab