Description Usage Arguments Details Author(s) See Also Examples
"rbind" recombination - Combine ddf divisions by row binding
1 |
... |
additional attributes to define the combiner (currently only used internally) |
combRbind
is passed to the argument combine
in recombine
Ryan Hafen
divide
, recombine
, combDdo
, combDdf
, combCollect
, combMeanCoef
, combMean
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Create a distributed data frame using the iris data set
bySpecies <- divide(iris, by = "Species")
# Create a function that will calculate the standard deviation of each
# variable in in a subset. The calls to 'as.data.frame()' and 't()'
# convert the vector output of 'apply()' into a data.frame with a single row
sdCol <- function(x) as.data.frame(t(apply(x, 2, sd)))
# Combine the results using rbind
combined <- recombine(addTransform(bySpecies, sdCol), combine = combRbind)
class(combined)
combined
# A more concise (and readable) way to do it
bySpecies %>%
addTransform(sdCol) %>%
recombine(combRbind)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.