File: lazy_eval.Rd

package info (click to toggle)
r-cran-lazyeval 0.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 596 kB
  • sloc: ansic: 310; sh: 9; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 643 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lazy-eval.R
\name{lazy_eval}
\alias{lazy_eval}
\title{Evaluate a lazy expression.}
\usage{
lazy_eval(x, data = NULL)
}
\arguments{
\item{x}{A lazy object or a formula.}

\item{data}{Option, a data frame or list in which to preferentially look
for variables before using the environment associated with the lazy
object.}
}
\description{
Evaluate a lazy expression.
}
\examples{
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))
}