make_call: Make a call with 'lazy_dots' as arguments.

Description Usage Arguments Value Examples

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 baseenv() if all environments aren't the same.

Usage

1

Arguments

fun

Function as symbol or quoted call.

args

Arguments to function; must be a lazy_dots object, or something as.lazy_dots() can coerce..

Value

A list:

env

The common environment for all elements

expr

The expression

Examples

1
2
3
4
5
6
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))

Example output

<lazy>
  expr: f(x = 1, 2)
  env:  <environment: R_GlobalEnv>
<lazy>
  expr: f(x = 1, y = x)
  env:  <environment: base>
<lazy>
  expr: f(x)
  env:  <environment: R_GlobalEnv>
<lazy>
  expr: f(x)
  env:  <environment: base>

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