Examples for 'rlang::call_args'


Extract arguments from a call

Aliases: call_args call_args_names

Keywords:

### ** Examples

call <- quote(f(a, b))

# Subsetting a call returns the arguments converted to a language
# object:
call[-1]
a(b)
# On the other hand, call_args() returns a regular list that is
# often easier to work with:
str(call_args(call))
List of 2
 $ : symbol a
 $ : symbol b
# When the arguments are unnamed, a vector of empty strings is
# supplied (rather than NULL):
call_args_names(call)
[1] "" ""

[Package rlang version 1.1.4 Index]