**From:** chris1 (*chris1@psyctc.org*)

**Date:** Sun 09 May 2004 - 02:09:54 EST

**Next message:**Roger D. Peng: "Re: [R] Indexing column of a matrix with infix $"**Previous message:**Uwe Ligges: "Re: [R] help about R"**Next in thread:**Roger D. Peng: "Re: [R] Indexing column of a matrix with infix $"**Reply:**Roger D. Peng: "Re: [R] Indexing column of a matrix with infix $"**Reply:**Douglas Bates: "Re: [R] Indexing column of a matrix with infix $"**Reply:**Gabor Grothendieck: "Re: [R] Indexing column of a matrix with infix $"

Message-id: <1602725397.20040508170954@psyctc.org>

I'm using 1.9.0 on Windoze 2k and I created a numeric matrix and used

colnames() to give it some column names, but if I try to select a

column using matrixname$validname I get a null return but if I use

matrixname[,4] it works fine. Looking at the help I think this is

because a matrix is not a recursive structure and I think it's saying

I shouldn't be surprised nor attempt this.

I'm in the process of transferring all my stats work to R having used

a mixture of SPSS, S and SAS (and snippets of other things) over the

years so sorry if I'm being dumb but this surprised me and I'd love a

kindly explanation as I thought indexing a matrix in this way was

something I did regularly (I think the last time was actually using it

on a dataframe though) and I also think it would be useful and produce

more readable code if I could.

Can some kindly soul explain?

TIA,

Chris

______________________________________________

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help

PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

**Next message:**Roger D. Peng: "Re: [R] Indexing column of a matrix with infix $"**Previous message:**Uwe Ligges: "Re: [R] help about R"**Next in thread:**Roger D. Peng: "Re: [R] Indexing column of a matrix with infix $"**Reply:**Roger D. Peng: "Re: [R] Indexing column of a matrix with infix $"**Reply:**Douglas Bates: "Re: [R] Indexing column of a matrix with infix $"**Reply:**Gabor Grothendieck: "Re: [R] Indexing column of a matrix with infix $"

*
This archive was generated by hypermail 2.1.3
: Mon 31 May 2004 - 23:05:08 EST
*