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

From: <vincent_at_7d4.com>
Date: Tue 06 Dec 2005 - 21:05:40 EST

shanmuha boopathy a écrit :

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

(Not sure I fully understand the question), but : rn = rownames(a);
cn = colnames(a);



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 21:42:59 2005

This archive was generated by hypermail 2.1.8 : Tue 06 Dec 2005 - 23:38:55 EST