I\'ve looked through much of the documentation and done a fair amount of Googling, but can\'t find an answer to the following question: Is there a way to induce \'next-like\' fu
You could put your code in a function and call return. It's not clear from your example what you want it to do when n %% 3 so I'll return NA.
return
n %% 3
NA
funi <- function(i) { n <- i + floor(runif(1, 0, 9)) if (n %% 3) return(NA) n } foreach(i = 1:10, .combine = "c") %dopar% { funi(i) }