A list to splice.
Arguments to collect in a list. These dots are dynamic.
Whether to ignore empty arguments. Can be one of
"trailing", only the last argument is ignored if it is empty.
Whether to preserve the empty arguments that were not ignored. If
TRUE, empty arguments are stored with
FALSE(the default) an error is thrown when an empty argument is detected.
How to treat arguments with the same name. The default,
"keep", preserves these arguments. Set
"first"to only keep the first occurrences, to
"last"to keep the last occurrences, and to
"error"to raise an informative error and indicate what arguments have duplicated names.
Whether to check for
TRUEa warning recommends users to use
=if they meant to match a function parameter or wrap the
<-call in curly braces otherwise. This ensures assignments are explicit.
In quoting functions
!!!disaggregates its argument (let's call it
x) into as many objects as there are elements in
quo(foo(!!! c(1, 2)))is completely equivalent to
quo(foo(1, 2)). The creation of those separate objects has an overhead but is typically not important when manipulating calls because function calls typically take a small number of arguments.
In standard functions, disaggregating the spliced collection would have a negative performance impact in cases where
dots_list()is used to build up data structures from user inputs. To avoid this spliced inputs are marked with
splice()and the final list is built with (the equivalent of)
Most of the time you should not care about the difference. However
if you use a standard function taking tidy dots within a quoting
!!! operator will disaggregate its argument because
the behaviour of the quasiquoting function has priority. You might
then observe some performance cost in edge cases. Here is one
example where this would happen:
::rerun(10, dplyr::bind_rows(!!! x))purrr
purrr::rerun() is a quoting function and
a standard function. Because
bind_rows() is called inside
rerun(), the list
x will be disaggregated into a pairlist of
arguments. To avoid this you can use
dots_splice()is in the questioning stage. It is part of our experiments with dots semantics. Compared to
dots_splice()automatically splices lists. We now lean towards adopting a single type of dots semantics (those of
dots_list()) where splicing is explicit.
splice()is in the questioning stage. It is not clear whether it is really needed as there are other ways to avoid the performance issue discussed above.