Learn R Programming

ThomasJeffersonUniv (version 0.1.3)

sample.by.int: Indices of Stratified Sampling

Description

Indices of Stratified Sampling

Usage

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

Value

Function sample.by.int returns an integer

vector.

Arguments

f

factor

...

potential parameters of sample.int

Details

End user should use interaction to combine multiple factors.

See Also

Examples

Run this code
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

Run the code above in your browser using DataLab