Re: [R] matrix export

From: Sean Davis <>
Date: Fri 20 Jan 2006 - 06:09:47 EST

On 1/19/06 2:05 PM, "Eric Pante" <> wrote:

> Thanks, Bert
> write.table won't do the trick, because distance matrices in R are
> presented as lower triangular matrices. write.table "cannot coerce
> class "dist" into a data.frame".
> maybe there is a way to transform the lower triangular matrix into a
> full matrix, and then use write.table ?

Did you try as.matrix()?

>From the dist() help page:

     'as.dist()' is a generic function.  Its default method handles
     objects inheriting from class '"dist"', or coercible to matrices
     using 'as.matrix()'.

Sean mailing list PLEASE do read the posting guide! Received on Fri Jan 20 06:17:42 2006

This archive was generated by hypermail 2.1.8 : Fri 20 Jan 2006 - 10:10:14 EST