Mike Prager <[EMAIL PROTECTED]> wrote:

> Gurus,
> 
> Can I rely on the rownames() function, when applied to a matrix,
> always returning either NULL or an object of type character?  It
> seems that row names can be entered as integers, but as of now
> (R 2.4.1 on Windows) the function returns character vectors, not
> numbers (which is my desired result).

(To clarify my point on this Friday afternoon:  the observed
behavior is my desired result.  I'm just asking, can I count on
it?)

> I am using elements of the returned vector to index the matrix.
> e.g.,
> 
> nams <- rownames(mymat)
> for (thisnam in nams) {
>       myvec <- mymat[thisnam, ]
>       # ... more code ...
> }

-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to