with_arg: Inject named arguments into several calls and evaluate those...

Description Usage Arguments Details Value Author(s)

Description

For a simple example, writing with_args(a="repeated argument", func(b=2), func(c=3), .collect=list)

Usage

1

Arguments

...

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’.

Details

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.

Value

The results of the evaluated calls, collected using .collect.

Author(s)

Peter Meilstrup


crowding/vadr documentation built on May 14, 2019, 11:33 a.m.