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
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.