[R] how to extract row& col names from a matrix

From: shanmuha boopathy <tts_boopathy_at_yahoo.com>
Date: Tue 06 Dec 2005 - 20:42:39 EST


Dear all,
  I like to extract row names & column names from the named matrix......    

  like......    

   a<-matrix(1:6,2)
 ro<-c("aa","bb")
 co<-c("dd","ee","ff")
 dimnames(a)<-list(ro,co)
a   

>

    dd ee ff
aa 1 3 5
bb 2 4 6    

  from the above matrix "a"
  I like to extract
  rownames separately like rownames(a)= (aa,bb)     column names separately like col names(a)= (dd,ee,ff)    

  Kindly suggest me some good ways.......

  tha´nk you all    

  with regards,
  boopathy.

Thirumalai Shanmuha Boopathy,
Zimmer no : 1109,
Rütscher strasse 165,
52072 Aachen .
Germany.  

Home zone : 0049 - 241 - 9813409
Mobile zone : 0049 - 176 - 23567867                 


 Single? There's someone we'd like you to meet.

        [[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 Dec 06 20:49:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:29 EST