sample.by.int: Indices of Stratified Sampling

View source: R/sample.by.int.R

sample.by.intR Documentation

Indices of Stratified Sampling

Description

Indices of Stratified Sampling

Usage

sample.by.int(f, ...)

Arguments

f

factor

...

potential parameters of sample.int

Details

End user should use interaction to combine multiple factors.

Value

Function sample.by.int returns an integer vector.

See Also

dplyr::slice_sample

Examples

id1 = sample.by.int(state.region, size = 2L)
state.region[id1]

id2 = sample.by.int(f = with(npk, interaction(N, P)), size = 2L)
npk[id2, c('N', 'P')] # each combination selected 2x


ThomasJeffersonUniv documentation built on July 3, 2024, 5:08 p.m.