iter_wrapper {iterpc} | R Documentation |
Wrap iterpc objects by iterators::iter
iter_wrapper(I, d = 1)
I |
the iterpc object |
d |
number of permutation(s)/combination(s) wanted in each iteration, default to 1 |
a iter object compatible with iterators package
library(iterators)
I <- iterpc(5, 2)
it <- iter_wrapper(I)
nextElem(it)
nextElem(it)
library(foreach)
I <- iterpc(5, 2)
it <- iter_wrapper(I)
foreach(x=it, .combine=c) %do% { sum(x) }