[R] Named arrays

David Winsemius dwinsemius at comcast.net
Tue Apr 22 04:39:31 CEST 2008


Erhan <bilal.erhan at gmail.com> wrote in
news:83a530a9-cce8-41a2-80b5-9cb5ec5e0b64 at m3g2000hsc.googlegroups.com: 

> Hi! I need to access all the strings used as indexes in an array.
> Can someone tell me how to do that?
> I'm not sure this is the right place to ask, but I couldn't find
> another group.

In R dataframe indices can be either row or column names. For column 
names use;

?names

  ... and for row names:

?row.names

For matrix-like objects (of which dataframes are an instance) see also:

?rownames
?colnames

-- 
David Winsemius



More information about the R-help mailing list