call_modify: Modify the arguments of a call.

Description Usage Arguments Examples

Description

Modify the arguments of a call.

Usage

1
2
3

Arguments

call

A call to modify. It is first standardised with call_standardise.

new_args

A named list of expressions (constants, names or calls) used to modify the call. Use NULL to remove arguments.

env

Environment in which to look up call value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
call <- quote(mean(x, na.rm = TRUE))
call_standardise(call)

# Modify an existing argument
call_modify(call, list(na.rm = FALSE))
call_modify(call, list(x = quote(y)))

# Remove an argument
call_modify(call, list(na.rm = NULL))

# Add a new argument
call_modify(call, list(trim = 0.1))

# Add an explicit missing argument
call_modify(call, list(na.rm = quote(expr = )))

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