dyn-dots {rlang} | R Documentation |
The ...
syntax of base R allows you to:
Forward arguments from function to function, matching them along the way to function parameters.
Collect arguments inside data structures, e.g. with c()
or
list()
.
Dynamic dots offer a few additional features:
You can splice arguments saved in a list with the big bang operator !!!
.
You can unquote names by using the bang bang
operator !!
on the left-hand side of :=
.
Trailing commas are ignored, making it easier to copy and paste lines of arguments.
If your function takes dots, adding support for dynamic features is
as easy as collecting the dots with list2()
instead of list()
.
Other dynamic dots collectors are dots_list()
, which is more
configurable than list2()
, vars()
which doesn't force its
arguments, and call2()
for creating calls.