lang_fn

0th

Percentile

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.

Usage
lang_fn(lang)
Arguments
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.

See Also

lang_name()

Aliases
  • lang_fn
Examples
# NOT RUN {
# Extract from a quoted call:
lang_fn(~matrix())
lang_fn(quote(matrix()))

# Extract the calling function
test <- function() lang_fn(call_frame())
test()
# }
Documentation reproduced from package rlang, version 0.1.6, License: GPL-3

Community examples

Looks like there are no examples yet.