Re: [R] Write lower half of distance matrix only

2008-07-26 Thread pgseye
Great, thanks for that Jim, It does what I need it do do. Regards, Paul jholtman wrote: Does this do what you want: x - matrix(1:25,5) x [,1] [,2] [,3] [,4] [,5] [1,]16 11 16 21 [2,]27 12 17 22 [3,]38 13 18 23 [4,]49 14

Re: [R] Write lower half of distance matrix only

2008-07-26 Thread Martin Maechler
jh == jim holtman [EMAIL PROTECTED] on Fri, 25 Jul 2008 12:34:49 -0400 writes: jh == jim holtman [EMAIL PROTECTED] on Fri, 25 Jul 2008 12:34:49 -0400 writes: jh Does this do what you want: x - matrix(1:25,5) x jh [,1] [,2] [,3] [,4] [,5] jh [1,]16

[R] Write lower half of distance matrix only

2008-07-25 Thread pgseye
Hi, I'm very new to R. I want to know if there is any way to write only the lower half of a distance matrix created in R to a csv file for example. I get the 'cannot coerce class dist into a data.frame' message when I try. I have used as.matrix and can write to a file this way, but as a full

Re: [R] Write lower half of distance matrix only

2008-07-25 Thread jim holtman
How do you want the lower half written out? can you give us an example of the input matrix and then what you would expect to see on the output. Is it still a matrix with the upper half set to zero/NA? Do you want it as a vector? What is the other program expecting as input? You need to provide