File: make_call.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 (33 lines) | stat: -rw-r--r-- 954 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
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lazy-call.R
\name{make_call}
\alias{make_call}
\title{Make a call with \code{lazy_dots} as arguments.}
\usage{
make_call(fun, args)
}
\arguments{
\item{fun}{Function as symbol or quoted call.}

\item{args}{Arguments to function; must be a \code{lazy_dots} object,
or something \code{\link{as.lazy_dots}()} can coerce..}
}
\value{
A list:
  \item{env}{The common environment for all elements}
  \item{expr}{The expression}
}
\description{
In order to exactly replay the original call, the environment must be the
same for all of the dots. This function circumvents that a little,
falling back to the \code{\link{baseenv}()} if all environments aren't
the same.
}
\examples{
make_call(quote(f), lazy_dots(x = 1, 2))
make_call(quote(f), list(x = 1, y = ~x))
make_call(quote(f), ~x)

# If no known or no common environment, fails back to baseenv()
make_call(quote(f), quote(x))
}