powered by
Draws simple random sample without replacement
rsamp(df, n, over = 0, rep = FALSE)
object containing full sampling data frame (e.g. data)
sample size (integer) or object containing sample size
(optional) desired oversampling proportion (defaults to 0; takes value between 0 and 1 as input)
(optional)
Returns simple random sample without replacement
Simplified wrapper around dplyr::sample_n()
# 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