开发者

Do the R parallel extensions break the `apply` metaphor?

开发者 https://www.devze.com 2023-03-24 06:44 出处:网络
Every time I see a question on parallel processing in R, it uses the foreach function.Sinc开发者_C百科e for loops are not very R-like, is there a parallel version of apply, and if so why isn\'t it mor

Every time I see a question on parallel processing in R, it uses the foreach function. Sinc开发者_C百科e for loops are not very R-like, is there a parallel version of apply, and if so why isn't it more popular?


There are numerous parallel versions of *apply, starting with

  • parLapply() in snow
  • mclapply() in multicore
  • mpi.apply() in Rmpi

as well as dedicated packages such as papply (possibly no longer maintained).


@Dirk is correct. I'd add that the plyr package now has support for a parallel backend.

In the case of the plyr package, it may be the case that little is mentioned because dropping in a parallel backend doesn't take any thought: it's just a flag.

0

精彩评论

暂无评论...
验证码 换一张
取 消