invoke

0th

Percentile

Invoke a Function Call

An alternative interface for do.call(), similar to the deprecated function in purrr. This function tries hard to not evaluate the passed arguments too eagerly which is important when working with large R objects.

It is recommended to pass all arguments named in order to to not rely on on positional argument matching.

Usage
invoke(.f, ..., .args = list())
Arguments
.f

:: function() Function to call.

...

:: any Additional function arguments passed to .f.

.args

:: list() Additional function arguments passed to .f, as (named) list(). These arguments will be concatenated to the arguments provided via ....

Aliases
  • invoke
Examples
# NOT RUN {
invoke(mean, .args = list(x = 1:10))
invoke(mean, na.rm = TRUE, .args = list(1:10))
# }
Documentation reproduced from package mlr3misc, version 0.1.0, License: LGPL-3

Community examples

Looks like there are no examples yet.