substitute_q: A version of substitute that evaluates its first argument.

Description Usage Arguments Examples

View source: R/substitute.r

Description

This version of substitute is needed because substitute does not evaluate it's first argument, and it's often useful to be able to modify a quoted call.

Usage

1
substitute_q(x, env)

Arguments

x

a quoted call

env

an environment, or something that behaves like an environment (like a list or data frame), or a reference to an environment (like a positive integer or name, see as.environment for more details)

Examples

1
2
3
x <- quote(a + b)
substitute(x, list(a = 1, b = 2))
substitute_q(x, list(a = 1, b = 2))

hadley/pryr documentation built on Feb. 20, 2018, 6:11 a.m.