Skip to content
Prev 206548 / 398503 Next

Choose every second value

try this:

a <- c(1,2,3,4,5,6)

n <- length(a)
a[seq(1, n, 2)]
a[seq(2, n, 2)]


I hope it helps.

Best,
Dimitris
Walther, Alexander wrote: