[R] untaring files in parallel with foreach and doSNOW?

2012-07-24 Thread arielob
Hello, I'm running some code that requires untaring many files in the first step. This takes a lot of time and I'd like to do this in parallel, if possible. If it's the disk reading speed that is the bottleneck I guess I should not expect an improvement, but perhaps it's the processor. So I want t

Re: [R] untaring files in parallel with foreach and doSNOW?

2012-07-24 Thread arielob
By the way, the code works under MacOS with: >library(foreach) >library(doMC) >registerDoMC() >foreach(i=tar.files.vector) %dopar% untar(i) So it has to do with how I write the foreach command on windows... I tried reading the vignettes and they didn't help much on this. Thanks again, Ariel

Re: [R] untaring files in parallel with foreach and doSNOW?

2012-07-24 Thread arielob
Thanks, I had the wrong impression that the parallel package had only forking capabilities (such as multicore), but I missed the parLapply() function. This code now works under Windows: >library(parallel) >cl <- makeCluster(4) >parLapply(cl, X=tar.files.vector, fun=untar) -- View this mes