Learn R Programming

RSSL (version 0.9.3)

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)

Arguments

y

factor; factor with levels

k

integer; number of indices to sample per level

Value

vector with indices for sample