Learn R Programming

rbmi (version 1.4.1)

sample_ids: Sample Patient Ids

Description

Performs a stratified bootstrap sample of IDS ensuring the return vector is the same length as the input vector

Usage

sample_ids(ids, strata = rep(1, length(ids)))

Arguments

ids

vector to sample from

strata

strata indicator, ids are sampled within each strata ensuring the that the numbers of each strata are maintained

Examples

Run this code
if (FALSE) {
sample_ids( c("a", "b", "c", "d"), strata = c(1,1,2,2))
}

Run the code above in your browser using DataLab