Extract function from a call
If a frame or formula, the function will be retrieved from the associated environment. Otherwise, it is looked up in the calling frame.
call_fn(call, env = caller_env())
call |
Can be a call or a quosure that wraps a call. |
env |
The environment where to find the definition of the
function quoted in |
In rlang 0.2.0, lang_fn()
was deprecated and renamed to
call_fn()
. See lifecycle section in call2()
for more about this
change.
# Extract from a quoted call: call_fn(quote(matrix())) call_fn(quo(matrix())) # Extract the calling function test <- function() call_fn(call_frame()) test()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.