Is this what you want:
> x <- matrix(1:16,4)
> rownames(x) <- colnames(x) <- LETTERS[1:4]
> x
A B C D
A 1 5 9 13
B 2 6 10 14
C 3 7 11 15
D 4 8 12 16
> require(reshape)
> # create single list
> z <- melt(x)
> z
X1 X2 value
1 A A 1
2 B A 2
3 C A 3
4 D A 4
5 A B
Heja,
I've some bigger distance-matrices like this:
num [1:3231, 1:3231] 0.000 0.176 0.176 0.176 0.176 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:3231] "A" "B" "C" "D" ...
..$ : chr [1:3231] A" "B" "C" "D" .
I actually want to convert them into a 2 column dataframe like this:
data.f
2 matches
Mail list logo