Let's say I had a vector:
remove <- c(17, 18, 19, 20, 24, 25, 30, 31, 44, 45)
.
How do I select / extract every second value in the vector? Like so: 17, 19, 24, 30, 44
I'm trying to use the seq
function: seq(remove, 2)
but it doesn't quite work.
Any help is greatly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…