[R] variable row names

From: COMTE Guillaume <g.comte_at_alliance-ir.net>
Date: Tue 16 May 2006 - 23:36:49 EST

Hy all,  

I wish to use a variable as rownames for a set of datas.  

By example :    

> nom<-"toto"

> prenom<-"tutu"

> res<-c(1,2)

> res<-t(res)

> res

     [,1] [,2]

[1,] 1 2

> colnames(res)<-c(nom,prenom)

> res

     toto tutu

[1,] 1 2

> nom

[1] "toto"


I wish to call the rowname by the variable name, in this case it would be < nom > or < prenom > , but if i do that it gives me the name of the row not the values of it.  

Is this possible or not?  

Thks all.  

COMTE Guillaume  

        [[alternative HTML version deleted]]

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 Tue May 16 23:37:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 17 May 2006 - 00:10:09 EST.

Mailing list information is available at HREF="https://stat.ethz.ch/mailman/listinfo/r-help">https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.