call_args

0th

Percentile

Extract arguments from a call

Extract arguments from a call

Usage
call_args(call = NULL)
call_args_lsp(call = NULL)
call_args_names(call = 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.
Value

A named list of arguments. The _lsp version returns a named pairlist.

See Also

fn_fmls() and fn_fmls_names()

Aliases
  • call_args
  • call_args_lsp
  • call_args_names
Examples
call <- quote(f(a, b))

# Subsetting a call returns the arguments in a language pairlist:
call[-1]

# Whereas call_args() returns a list:
call_args(call)

# When the call arguments are supplied without names, a vector of
# empty strings is supplied (rather than NULL):
call_args_names(call)
Documentation reproduced from package rlang, version 0.0.0.9000, License: GPL-3

Community examples

Looks like there are no examples yet.