[R] Changing Matrix Header

2009-01-06 Thread Gundala Viswanath
Dear all, I have the following matrix. dat A A A A A A A A A A [1,] 0 0 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 0 1 [3,] 0 0 0 0 0 0 0 0 0 2 How can I change it into: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0 0 0 0 0

Re: [R] Changing Matrix Header

2009-01-06 Thread Simon Pickett
, Si. - Original Message - From: Gundala Viswanath gunda...@gmail.com To: r-h...@stat.math.ethz.ch Sent: Tuesday, January 06, 2009 8:14 AM Subject: [R] Changing Matrix Header Dear all, I have the following matrix. dat A A A A A A A A A A [1,] 0 0 0 0 0 0 0 0 0 0 [2

Re: [R] Changing Matrix Header

2009-01-06 Thread Carlos J. Gil Bellosta
Hello, colnames( dat ) - NULL will do the trick. Carlos J. Gil Bellosta http://www.datanalytics.com On Tue, 2009-01-06 at 17:14 +0900, Gundala Viswanath wrote: Dear all, I have the following matrix. dat A A A A A A A A A A [1,] 0 0 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0

Re: [R] Changing Matrix Header

2009-01-06 Thread Henrique Dallazuanna
Try this: unname(dat) On Tue, Jan 6, 2009 at 6:14 AM, Gundala Viswanath gunda...@gmail.comwrote: Dear all, I have the following matrix. dat A A A A A A A A A A [1,] 0 0 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 0 1 [3,] 0 0 0 0 0 0 0 0 0 2 How can I change it into: