rlang (version 0.0.0.9000)

call_fn: Extract function from a call

Description

Extract function from a call

Usage

call_fn(call = NULL, env = NULL)

Arguments

call
Can be a call, a formula quoting a call in the right-hand side, or a frame object from which to extract the call expression. If not supplied, the calling frame is used.
env
Environment in which to look up the function. The default is the calling frame.

See Also

call_fn_name()

Examples

Run this code
# Extract from a quoted call:
call_fn(~matrix())
call_fn(quote(matrix()))

# Extract the calling function
test <- function() call_fn()
test()

Run the code above in your browser using DataLab