[R] how to rename rows/columns of a matrix?
David Khabie-Zeitoune
dave at evocapital.com
Tue Jul 8 18:34:53 CEST 2003
If A is your matrix try:
cnames(A) = paste("X", 1:ncol(A), sep="")
-----Original Message-----
From: David Andel [mailto:andel at ifi.unizh.ch]
Sent: 08 July 2003 17:23
To: R-Project
Subject: [R] how to rename rows/columns of a matrix?
Hi
I get a matrix with the columns named like "X13 X22 X1 X14 ...", i.e.
not
successively. That has it's good reasons, but now how can I rename the
columns to "X1 X2 X3 ..."?
Thanks a lot,
David
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list