| pool_lapply | R Documentation |
An alternative dispatch that uses parallel::parLapply-style execution but with supervision. This is a simpler interface for basic parallel apply.
pool_lapply(X, FUN, ..., pool = NULL, chunk_size = 1L)
X |
List or vector to iterate over. |
FUN |
Function to apply to each element. |
... |
Additional arguments to FUN. |
pool |
A |
chunk_size |
Integer. Elements per chunk (default 1). |
A list of results.
pool_create(2)
result <- pool_lapply(1:4, function(x) x^2, pool = pool_get())
pool_stop()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.