Re: [R] Change column/row-name

2011-10-21 Thread David Winsemius
On Oct 21, 2011, at 1:57 AM, Jörg Reuter wrote: Hi, I am very happy. My problems are solved without one little thing: (Iske <- matrix(c(1, 1, 1, 2, 2, 2, 1, 1, 1, 5, 1, 2, 2, 2, 1, 1, 1, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5,

Re: [R] Change column/row-name

2011-10-21 Thread R. Michael Weylandt
I'm not sure I follow: the matrix Iske doesn't have row or column namesthough if you perhaps mean you want to use the pasted together rows as names on the distance matrix rather than the converted characters, this will do it: Iske.rows <- apply(Iske, 1, paste, collapse = "") # Perhaps subtract

[R] Change column/row-name

2011-10-20 Thread Jörg Reuter
Hi, I am very happy. My problems are solved without one little thing: (Iske <- matrix(c(1, 1, 1, 2, 2, 2, 1, 1, 1, 5, 1, 2, 2, 2, 1, 1, 1, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 2), ncol = 5)) #My Matrix Iske<- Iske+33 #I wan