Execute f in parallel partitioned by partition_column
, see partition_tables
for details.
execute_parallel( tables, f, partition_column, ..., cl = NULL, debug = FALSE, env = parent.frame() )Arguments tables
named map of tables to use.
ffunction to apply to each tableset signature is function takes a single argument that is a named list of data.frames.
partition_columncharacter name of column to partition on
...force later arguments to bind by name.
clparallel cluster.
debuglogical if TRUE use lapply instead of parallel::clusterApplyLB.
envenvironment to look for values in.
Valuelist of f evaluations.
See also Examplesif(requireNamespace("parallel", quietly
= TRUE)) { cl <- parallel::makeCluster(2) d <- data.frame(x
= 1:5, g
= c(1,
1,
2,
2,
2)) f <- function(dl) { d <- dl$d d$s <- sqrt(d$x) d } r <- execute_parallel(list(d
= d),
f, partition_column
= "g", cl
= cl) %.>% do.call(rbind,
.) %.>% print(.) parallel::stopCluster(cl) }#> x g s #> 1.1 1 1 1.000000 #> 1.2 2 1 1.414214 #> 2.1 3 2 1.732051 #> 2.2 4 2 2.000000 #> 2.3 5 2 2.236068
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4