loop_ind_f | R Documentation |
loop_ind_f
is a helper function that splits
a vector of loop indices into a list of multiple loop indices
for use in parallel processes within the flowGraph package.
loop_ind_f(x, n)
x |
A vector of loop indices. |
n |
An integer, or the number of vectors to split |
list of n
vectors with elements from x
.
old_loop_inds <- 1:10
no_cores <- 5
new_loop_inds <- flowGraph:::loop_ind_f(old_loop_inds, no_cores)
# future::plan(future::multisession)
# example_indices <- furrr::future_map(new_loop_inds, function(ii) {
# purrr::map(ii, function(i) i )
# s})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.