This is a wrapper around sample() to make it easy to select random rows from a table. Supports both integer (sampleSize) and fractional (sampleFraction) N row sampling. For reproducible debugging, set a hash seed.
.sample(data, sampleSize = NULL, sampleFraction = 1, setSeed = NULL)
Dataframe to be sampled
a non-negative integer giving the number of rows to choose.
the fraction of rows to choose.
smapleSize
is uised)
an integer that sets random numbver generation. Can be used to reproduce sampling.
A data.frame