Unless I have seriously misjudged, you really really really need to go
through an R tutorial -- An Intro to R ships with R, but there are
many on the web -- before posting here further. You do not appear to
have made much of an effort to learn even the basics, and I consider
it unfair to post questions here on basic matters that a tutorial
would tell you about.
And, of course, my apologies if I have gotten it wrong.
On 07/21/2014 01:33 PM, carol white wrote:
> Might be a trivial question but how to identify the odd and even indices of a vector?
> x = c(1,z,w,2,6,7)
> el of odd indices= 1,w,6
> el of even indices= z,2,7
The easiest way is to subset your vector with c(TRUE, FALSE) to keep
only the odd indices: