[R] fedback from foreach

Bond, Stephen Stephen.Bond at cibc.com
Tue Jun 13 22:05:20 CEST 2017


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


	[[alternative HTML version deleted]]



More information about the R-help mailing list