Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

substituteExpr

Substitute on an expression in a value


Description

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

Usage

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)

References

See Also

Examples

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

stackoverflow

Stack Overflow's Greatest Hits

v0.7.0
CC BY-SA 4.0
Authors
Neal Fultz <nfultz@gmail.com> and the StackOverflow.com community
Initial release
2020-01-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.