combRbind: "rbind" Recombination

Description Usage Arguments Details Author(s) See Also Examples

Description

"rbind" recombination - Combine ddf divisions by row binding

Usage

1

Arguments

...

additional attributes to define the combiner (currently only used internally)

Details

combRbind is passed to the argument combine in recombine

Author(s)

Ryan Hafen

See Also

divide, recombine, combDdo, combDdf, combCollect, combMeanCoef, combMean

Examples

 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)

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