Learn R Programming

datadr (version 0.8.6.1)

drSample: Take a Sample of Key-Value Pairs Take a sample of key-value Pairs

Description

Take a Sample of Key-Value Pairs Take a sample of key-value Pairs

Usage

drSample(x, fraction, output = NULL, overwrite = FALSE, control = NULL)

Arguments

x

a 'ddo' or 'ddf' object

fraction

fraction of key-value pairs to keep (between 0 and 1)

output

a "kvConnection" object indicating where the output data should reside (see localDiskConn, hdfsConn). If NULL (default), output will be an in-memory "ddo" object.

overwrite

logical; should existing output location be overwritten? (also can specify overwrite = "backup" to move the existing output to _bak)

control

parameters specifying how the backend should handle things (most-likely parameters to rhwatch in RHIPE) - see rhipeControl and localDiskControl

Examples

Run this code
# 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