[R] construct a vector
axionator
axionator at gmail.com
Wed Nov 26 14:11:43 CET 2008
Hi all,
I have an unkown number of vectors (>=2) all of the same length. Out
of these, I want to construct a new one as follows:
having vectors u,v and w, the resulting vector z should have entries:
z[1] = u[1], z[2] = v[1], z[3] = w[1]
z[4] = u[2], z[5] = v[2], z[6] = w[2]
...
i.e. go through the vector u,v,w, take at each time the 1st, 2sd, ...
elements and store them consecutively in z.
Is there an efficient way in R to do this?
Thanks in advance
Armin
More information about the R-help
mailing list