Displaying 1 result from an estimated 1 matches for "some_timeconsuming_operation".
2010 Apr 29
2
dopar parallel assignments
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)
}
Obviously, the difference is %dopar% vs. %do%. If I use %do%, I get
objects test_1.25 and test_1.50, but I don't get these