substituteExpr: Substitute on an expression in a value

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/substituteExpr.R

Description

If expr's value is an expression, substitute in any variables bound in env.

Usage

1
substituteExpr(expr, env)

Arguments

expr

an expression value

env

an environment or a list object.

Details

Differs in that substitute uses expr's expression and not value.

Author(s)

G. Grothendieck

References

https://stackoverflow.com/questions/47780150/use-variable-in-r-substitute/986793

See Also

substitute

Examples

1
2
a <- expression(z = y + x + 2)
substituteExpr(a, list(x=4))

stackoverflow documentation built on Jan. 10, 2020, 9:07 a.m.