dot-sample: General table row sampling

Description Usage Arguments Value

Description

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.

Usage

1
.sample(data, sampleSize = NULL, sampleFraction = 1, setSeed = NULL)

Arguments

data

Dataframe to be sampled

sampleSize

a non-negative integer giving the number of rows to choose.

sampleFraction

the fraction of rows to choose. smapleSize is uised)

setSeed

an integer that sets random numbver generation. Can be used to reproduce sampling.

Value

A data.frame


AirSensor documentation built on March 13, 2021, 1:07 a.m.