[R] Help needed on parallel processing
Milan Bouchet-Valat
nalimilan at club.fr
Wed Sep 26 10:11:42 CEST 2012
Le mercredi 26 septembre 2012 à 13:04 +0530, Anindya Sankar Dey a
écrit :
> Hi All,
>
> If i have a vector say x<-1:10 and then use
>
> parLapply(cl,x,function(k){k=k*2; return(k);}
>
> it works and will also parallel process depending on the number of cores
> and the number of clusters I've built in cl.
>
>
> My query is, if I want this function -
>
> function(k1,k2){ s=k1+k2; return(s);}
>
> to work using parallel processing what will be the procedure.
I think you should have a look at the clusterMap() function. It's the
parallel equivalent of mapply().
My two cents
More information about the R-help
mailing list