Learn R Programming

RSSL (version 0.9.7)

sample_k_per_level: Sample k indices per levels from a factor

Description

Sample k indices per levels from a factor

Usage

sample_k_per_level(y, k)

Value

vector with indices for sample

Arguments

y

factor; factor with levels

k

integer; number of indices to sample per level