Description Usage Arguments Details Value Author(s)
For a simple example, writing
with_args(a="repeated argument", func(b=2), func(c=3), .collect=list)
1 |
... |
Named arguments are interpreted as arguments to inject. Unnamed arguments are interpreted as calls to evaluate. |
.collect |
Which function to use to collect the results of all the subcalls. Default is ‘list’. |
is equivalent to writing
list(fun(a="repeated argument",b=2), func(a="repeated argument",c=3))
so that with_args handles the job of distributing the repeated 'a' argument. This can save some typing in some situations, like heavily layered ggplot constructions.
The results of the evaluated calls, collected using .collect
.
Peter Meilstrup
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.