Returns a stratified sample without replacement
sampleBy.Rd
Returns a stratified sample without replacement based on the fraction given on each stratum.
Usage
sampleBy(x, col, fractions, seed)
# S4 method for class 'SparkDataFrame,character,list,numeric'
sampleBy(x, col, fractions, seed)
See also
Other stat functions:
approxQuantile()
,
corr()
,
cov()
,
crosstab()
,
freqItems()
Examples
if (FALSE) { # \dontrun{
df <- read.json("/path/to/file.json")
sample <- sampleBy(df, "key", fractions, 36)
} # }