Description Usage Arguments Examples
Title
1 | prgr(fun, iterations)
|
iterations |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | shout <- function() Sys.sleep(0.1)
reps <- 100
shout <- prgr(shout, reps)
Sys.sleep(3)
replicate(reps, shout())
cl <- parallel::makeCluster(2)
fun <- function(x) {Sys.sleep(1); x}
system.time(
parallel::parLapply(cl, 1:10, fun)
)
fun <- prgr(fun, iterations = 10)
system.time(
parallel::clusterCall(cl, fun)
)
doParallel::registerDoParallel(cl)
foreach::`%do%`(foreach::foreach(1:10, .packages = "tcltk"), fun())
foreach::foreach()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.