samples <- data.frame(L = letters[1:25], Age = rnorm(25),
type = sample(LETTERS[1:5], 25, TRUE))
index <- replicates(samples, 5, controls = 2, omit = "L", iterations = 10)
head(index)
Run the code above in your browser using DataLab