invoke {mlr3misc} | R Documentation |
Invoke a Function Call
Description
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 not rely on positional argument matching.
Usage
invoke(
.f,
...,
.args = list(),
.opts = list(),
.seed = NA_integer_,
.timeout = Inf
)
Arguments
.f |
( |
... |
( |
.args |
( |
.opts |
(named |
.seed |
( |
.timeout |
( |
Examples
invoke(mean, .args = list(x = 1:10))
invoke(mean, na.rm = TRUE, .args = list(1:10))