sample.by.int {ThomasJeffersonUniv} | R Documentation |
Indices of Stratified Sampling
Description
Indices of Stratified Sampling
Usage
sample.by.int(f, ...)
Arguments
f |
|
... |
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
[Package ThomasJeffersonUniv version 0.1.3 Index]