lazy_eval: Evaluate a lazy expression.

Description Usage Arguments Examples

Description

Evaluate a lazy expression.

Usage

1

Arguments

x

A lazy object or a formula.

data

Option, a data frame or list in which to preferentially look for variables before using the environment associated with the lazy object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
f <- function(x) {
  z <- 100
  ~ x + z
}
z <- 10
lazy_eval(f(10))
lazy_eval(f(10), list(x = 100))
lazy_eval(f(10), list(x = 1, z = 1))

lazy_eval(lazy_dots(a = x, b = z), list(x = 10))

Example output

[1] 110
[1] 200
[1] 2
$a
[1] 10

$b
[1] 10

lazyeval documentation built on May 2, 2019, 2:11 a.m.