Description Usage Arguments Details Author(s) See Also Examples
"Collect" recombination - collect the results into a local list of key-value pairs
1 |
... |
Additional list elements that will be added to the returned object |
combCollect
is passed to the argument combine
in recombine
Ryan Hafen
divide
, recombine
, combDdo
, combDdf
, combMeanCoef
, combRbind
, combMean
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.