How multidplyr works
mainmultidplyr is a backend for dplyr that partitions a data frame across multiple cores. The workflow follows these steps:
- Partitioning: You split the data using
partition(). The data stays on each worker node to minimize data movement. - Computation: You perform
dplyroperations on the partitioned data frame. These computations are spread across multiple cores. - Collection: You use
collect()to explicitly retrieve the processed data back to the main (host) R session.
Performance Note: Due to communication overhead, multidplyr is most effective when parallelizing slower and more complex functions. For simple operations on datasets with fewer than ~10 million observations, you may not see significant improvements and might prefer dtplyr.