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
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
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
3 matches
Mail list logo