powered by
Sample k indices per levels from a factor
sample_k_per_level(y, k)
factor; factor with levels
integer; number of indices to sample per level
vector with indices for sample