Rdocumentation
powered by
Learn R Programming
skm (version 0.1.5.4)
stratified_sampling: stratified_sampling
Description
select k elements from vector v w.r.t stratify structure group g. TODO - implementing via template so v is flexible as vec or uvec.
Usage
stratified_sampling(v, k, g)
Arguments
v
v: a numeric candidate v from which draw sample.
k
k: selection sample size.
g
g: stratify structure g - info on grouping of v so that the selected sample is stratified across groups.
Value
s
s: a vector select from v length k stratified by g.