View source: R/pch_register_parallel.R
pch_register_parallel | R Documentation |
Parallel computing helper function to register a parallel backend.
pch_register_parallel(ncores)
ncores |
An integer. A number of cores requested for parallel computing
(default: |
The function returns a object of class c("SOCKcluster", "cluster")
,
created with parallel::makePSOCKcluster()
.
parallel::makePSOCKcluster()
, doParallel::registerDoParallel()
if (require("doParallel") && require("foreach")) {
cl <- pch_register_parallel(pch_check_available_cores(2))
pch_clean_up(cl)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.