powered by
iter_wrapper(I, d = 1)
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) }
Run the code above in your browser using DataLab