combCollect: "Collect" Recombination

Description Usage Arguments Details Author(s) See Also Examples

Description

"Collect" recombination - collect the results into a local list of key-value pairs

Usage

1

Arguments

...

Additional list elements that will be added to the returned object

Details

combCollect is passed to the argument combine in recombine

Author(s)

Ryan Hafen

See Also

divide, recombine, combDdo, combDdf, combMeanCoef, combRbind, combMean

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Create a distributed data frame using the iris data set
bySpecies <- divide(iris, by = "Species")

# Function to calculate the mean of the petal widths
meanPetal <- function(x) mean(x$Petal.Width)

# Combine the results using rbind
combined <- recombine(addTransform(bySpecies, meanPetal), combine = combCollect)
class(combined)
combined

# A more concise (and readable) way to do it
bySpecies %>%
  addTransform(meanPetal) %>%
  recombine(combCollect)

datadr documentation built on May 1, 2019, 8:06 p.m.