[R] Mclapply and print statement

Alaios alaios at yahoo.com
Mon Apr 11 11:26:37 CEST 2011


Dear all.
I am using the mclapply function to split my code to the many cores my system has. It seems that is working fine. This is the parallel version of lcapply.

The only problem that I seem to have is that the printf cannot print messages. 

The ideal to me is to have fro my function an output of the form
Shadowlist<-mclapply(1:dimz, function(i) {
			      print(sprintf('Creating the %d map',i));
			      GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale,Whit.alpha))
			    }
	    ) 

'I am the processor %d and I work with the task %d',processorid,i

So far I get not output from my print(sprintf(... function.

What do you think I should try out?

Best Regards
Alex



More information about the R-help mailing list