[R] Renaming names in R matrix

2012-05-15 Thread Gundala Viswanath
I have the following matrix: dat [,1] [,2] [,3][,4] foo 0.7574657 0.2104075 0.02922241 0.002705617 foo 0.000 0.000 0. 0.0 foo 0.000 0.000 0. 0.0 foo 0.000 0.000 0. 0.0 foo 0.000

Re: [R] Renaming names in R matrix

2012-05-15 Thread Jessica Streicher
example: x-c(1,1,1) y-c(2,2,2) m-rbind(x,y) m [,1] [,2] [,3] x111 y222 dimnames(m) [[1]] [1] x y [[2]] NULL dimnames(m)[[1]]-c(a,b) m [,1] [,2] [,3] a111 b222 Am 15.05.2012 um 11:19 schrieb Gundala Viswanath: I have the following

Re: [R] Renaming names in R matrix

2012-05-15 Thread Paolo Agnolucci
Hello, A = matrix(0, 3,3) rownames(A) = c(A, B, C) A [,1] [,2] [,3] A000 B000 C000 HTH, Thanks, Paolo On 15 May 2012 10:19, Gundala Viswanath gunda...@gmail.com wrote: I have the following matrix: dat [,1] [,2]