Skip to content
Prev 206549 / 398503 Next

Choose every second value

Instead of making two vectors, you
might want to just have one matrix
with two rows:

amat <- matrix(a, nrow=2)

Then you can do:

amat[1,]
amat[2,]



Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")
Walther, Alexander wrote: