[R] dopar parallel assignments

Erik Iverson eriki at ccbr.umn.edu
Thu Apr 29 23:10:27 CEST 2010



Vivek Ayer wrote:
> Hi guys,
> 
> I was wondering why this piece of code doesn't work:
> 
> foreach (i = c(1.25,1.50)) %dopar% {
> assign(paste("test_",i,sep=""),i)
> }
> 
> but, this does:
> 
> foreach (i = c(1.25,1.50)) %do% {
> assign(paste("test_",i,sep=""),i)
> }
> 

... and which package are these functions in?



More information about the R-help mailing list