I think you can use something like:
x <- y[,2]
where y is the 10*4 matrix and x is a vector.
More generally, for one row:
x <- y[row_num,]
for one column:
x <- y[, col_num]
On Wed, 26 Feb 2003 Adam_Thomas(a)ksgphd.harvard.edu wrote:
Hello all,
Can anyone tell me how to extract a row or a column from a matrix? For
instance, if I had a 10*4 matrix and wanted to create a vector containing
only the 10 elements from the second column, what command(s) would I use?
Thanks,
Adam
_______________________________________________
gov2001-l mailing list
gov2001-l(a)fas.harvard.edu
http://www.fas.harvard.edu/mailman/listinfo/gov2001-l