lang_fn {rlang} | R Documentation |
If a frame or formula, the function will be retrieved from the associated environment. Otherwise, it is looked up in the calling frame.
lang_fn(lang)
lang |
Can be a call (language object), a formula quoting a call in the right-hand side, or a frame object from which to extract the call expression. |
# Extract from a quoted call: lang_fn(~matrix()) lang_fn(quote(matrix())) # Extract the calling function test <- function() lang_fn(call_frame()) test()