Description
dapplyCollect() applies an R function on each partition of a SparkDataFrame and collects the result back to R as a data.frame.
The signature of dapplyCollect() is as follows:
dapplyCollect(df, function(ldf) {...})
R function input: local data.frame from the partition on local node
R function output: local data.frame