powered by
slice(x, by = 2, pattern = NULL)
pattern
length(x)/pattern)+1
x <- seq(1:15) slice(x, by = 2) slice(x, pattern = 4) slice(sample(x), by= 2) # draw random pairs
Run the code above in your browser using DataLab