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

uneval

Capture the call associated with a promise.


Description

This is an alternative to subsitute that performs one job, and so gives a stronger signal regarding the intention of your code. It returns an error if the name is not associated with a promise.

Usage

uneval(x)

Arguments

x

unquoted variable name that refers to a promise. An error will be thrown if it's not a promise.

See Also

Other promise tools: is_promise

Examples

f <- function(x) {
   uneval(x)
}
f(a + b)
f(1 + 4)

delayedAssign("x", 1 + 4)
uneval(x)
x
uneval(x)

pryr

Tools for Computing on the Language

v0.1.4
GPL-2
Authors
Hadley Wickham [aut, cre], R Core team [ctb] (Some code extracted from base R)
Initial release

We don't support your browser anymore

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