> I am not 100% sure I understood what you intend to do but I think what
> you are saying is that you would like to address certain rows by name
> rather than by index. Is that correct?
> 
> If so you could solve it like this:
> 
> # assign the desired row names
> rownames(frame) = frame[,1]
> # remove the old name column
> frame <- frame[,2:ncol(frame)]

And adding to my own posting:

removing the column can be done more elegantly:

frame <- frame[,-1]

And I forgot to mention that now you can say things like

frame['x2',]w

The frame$y2 notation still only works for columns, of course.
Maybe, if you tell us some more about your actual analysis, 
more help can be provided.

cu
        Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/

______________________________________________
R-help@r-project.org 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