Skip to content
Prev 369766 / 398503 Next

fedback from foreach

Hi useRs,

I am running a foreach loop and hoped to get a small message when it hits a multiple of 1000, but it does not work.

        p <- foreach(i=1:10000, .combine='c') %dopar% {
            if(i%%1000==0) print(i)
            sqrt(i)
        }

What is the proper way to do it.
Thanks everybody.

Stephen B