Re: [R] CORRELATION MATRIX CONVERSION

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Fri 17 Jun 2005 - 16:26:29 EST

Omer Bakkalbasi wrote:

> How do I convert the output of cor(x) to a columnar format?
> Ex. from format below
> X Y Z
> X 1.0 0.9 0.5
> Y 0.9 1.0 0.1
> Z 0.5 0.1 1.0
>
> to format below
>
> X X 1.0
> X Y 0.9
> X Z 0.5
> Y X 0.9
> Y Y 1.0
> Y Z 0.1
> Z X 0.5
> Z Y 0.1
> Z Z 1.0

See, e.g., ?reshape

Uwe Ligges

> Thanks!
>
> Omer
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 17 17:33:43 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:46 EST