Apply a Function Over a List with Optional Auto-Sharing
Source:R/ergonomics.R
shard_lapply_shared.RdA convenience wrapper for list workloads that need supervision and shared inputs. Large atomic list elements are auto-shared based on policy.
Usage
shard_lapply_shared(
x,
FUN,
VARS = NULL,
workers = NULL,
...,
policy = shard_apply_policy()
)Arguments
- x
A list.
- FUN
Function of the form
function(el, ...).- VARS
Optional named list of extra variables (auto-shared when large).
- workers
Number of workers (passed to
shard_map()).- ...
Additional arguments forwarded to
FUN.- policy
A
shard_apply_policy()object.