Take a Sample of Key-Value Pairs Take a sample of key-value Pairs
drSample(x, fraction, output = NULL, overwrite = FALSE, control = NULL)
a 'ddo' or 'ddf' object
fraction of key-value pairs to keep (between 0 and 1)
a "kvConnection" object indicating where the output data should reside (see localDiskConn
, hdfsConn
). If NULL
(default), output will be an in-memory "ddo" object.
logical; should existing output location be overwritten? (also can specify overwrite = "backup"
to move the existing output to _bak)
parameters specifying how the backend should handle things (most-likely parameters to rhwatch
in RHIPE) - see rhipeControl
and localDiskControl
# NOT RUN {
bySpecies <- divide(iris, by = "Species")
set.seed(234)
sampleRes <- drSample(bySpecies, fraction = 0.25)
# }
Run the code above in your browser using DataLab