> a <- sample(c(1:10), 20, replace = TRUE) > a [1] 6 3 6 2 6 9 3 9 9 8 2 10 7 9 1 5 3 10 5 5 > a[c(TRUE,FALSE)] [1] 6 6 6 3 9 2 7 1 3