Learn R Programming

ff (version 4.5.0)

bigsample: Sampling from large pools

Description

bigsample samples quicker from large pools than sample does.

Usage

bigsample(x, ...)
# S3 method for default
bigsample(x, size, replace = FALSE, prob = NULL, negative = FALSE, ...)
# S3 method for ff
bigsample(x, size, replace = FALSE, prob = NULL, ...)

Value

a vector of elements sampled from the pool (argument 'x')

Arguments

x

the pool to sample from

size

the number of elements to sample

replace

TRUE to use sampling with replacement

prob

optional vector of sampling probabilities (recyled to pool length)

negative

negative

...

...

Author

Daniel Adler, Jens Oehlschlägel, Walter Zucchini

Details

For small pools sample is called.

See Also

sample, ff