sampler (version 0.2.4)

rsamp: Draws simple random sample without replacement

Description

Draws simple random sample without replacement

Usage

rsamp(df, n, over = 0, rep = FALSE)

Arguments

df

object containing full sampling data frame (e.g. data)

n

sample size (integer) or object containing sample size

over

(optional) desired oversampling proportion (defaults to 0; takes value between 0 and 1 as input)

rep

(optional)

Value

Returns simple random sample without replacement

References

Simplified wrapper around dplyr::sample_n()

Examples

Run this code
# NOT RUN {
rsamp(albania, n=360, over=0.1, rep=FALSE)

size <- rsampcalc(nrow(albania), 3, 95, 0.5)
randomsample <- rsamp(albania, size)
# }

Run the code above in your browser using DataLab