Re: [R] Problem with indexing (subscript out of bounds)

From: Nils Trebing <nils.trebing_at_gmx.de>
Date: Mon 12 Dec 2005 - 10:15:50 EST

Ferdinand Alimadhi wrote:

> There are two ways to index the matrices, using indexes of the row and
> columns or using names of rows and columns.
> In your example, it seems that you need to index your matrix by row names.

>
> X[rownames(X) %in% 17:19, ]
>
> could give the result you want.

Thanks a lot, this did the trick!

Regards,
Nils



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Dec 12 10:22:31 2005

This archive was generated by hypermail 2.1.8 : Mon 12 Dec 2005 - 20:30:38 EST