srs: Simple Random Sample

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/srs.R

Description

Computes all possible samples from a given population using simple random sampling

Usage

1
srs(popvalues, n)

Arguments

popvalues

are values of the population. NAs and Infs are allowed but will be removed from the population.

n

the sample size

Details

If non-finite values are entered as part of the population, they are removed; and the returned simple random sample computed is based on the remaining finite values.

Value

The function srs() returns a matrix containing the possible simple random samples of size n taken from a population of finite values popvalues.

Author(s)

Alan T. Arnholt <arnholtat@appstate.edu>

See Also

combn

Examples

1
srs(popvalues = c(5, 8, 3, NA, Inf), n = 2)

PASWR2 documentation built on Sept. 5, 2021, 5:44 p.m.