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

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jul 24 20:22:17 CEST 2012


On 24/07/2012 17:42, arielob wrote:
> 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.

So why are you asking us how to use third-party software whose 
documentation is not comprehensible to you?

This would be very easy to do in R itself (see package 'parallel').  And 
BTW the example it that package's vignette of installing R packages in 
parallel does do a lot of untarring in parallel


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list