Description Usage Arguments Details Author(s) See Also Examples
"DDO" recombination - simply collect the results into a "ddo" object
1 |
... |
additional attributes to define the combiner (currently only used internally) |
combDdo
is passed to the argument combine
in recombine
Ryan Hafen
divide
, recombine
, combCollect
, combMeanCoef
, combRbind
, combMean
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Divide the iris data
bySpecies <- divide(iris, by = "Species")
# Add a transform that returns a list for each subset
listTrans <- function(x) {
list(meanPetalWidth = mean(x$Petal.Width),
maxPetalLength = max(x$Petal.Length))
}
# Apply the transform and combine using combDdo
combined <- recombine(addTransform(bySpecies, listTrans), combine = combDdo)
combined
combined[[1]]
# A more concise (and readable) way to do it
bySpecies %>%
addTransform(listTrans) %>%
recombine(combDdo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.