r-help-bounces@r-project.org wrote on 08/19/2011 01:50:48 PM:

> [image removed] 
> 
> [R] display only the top-right half of a correlation matrix?
> 
> Liviu Andronic 
> 
> to:
> 
> r-help@r-project.org Help
> 
> 08/19/2011 01:55 PM
> 
> Sent by:
> 
> r-help-bounces@r-project.org
> 
> Dear all
> Is there an easy way to display only one half (top-right or
> bottom-left) of a correlation matrix?

See ?lower.tri

> 
> > require(Hmisc)
> > rcorr(as.matrix(mtcars[ , 1:4]))
>        mpg   cyl  disp    hp
> mpg   1.00 -0.85 -0.85 -0.78
> cyl  -0.85  1.00  0.90  0.83
> disp -0.85  0.90  1.00  0.79
> hp   -0.78  0.83  0.79  1.00
> 
> n= 32
> 
> 
> P
>      mpg cyl disp hp
> mpg       0   0    0
> cyl   0       0    0
> disp  0   0        0
> hp    0   0   0
> 
> 
> Since the two sides are identical, there is little value in having
> both displayed at the same time. Moreover, it considerably slows down
> the inspection of the results.
> 
> Thank you
> Liviu
> 

Jean

`·.,,  ><(((º>   `·.,,  ><(((º>   `·.,,  ><(((º>

Jean V. Adams
Statistician
U.S. Geological Survey
Great Lakes Science Center
223 East Steinfest Road
Antigo, WI 54409  USA
	[[alternative HTML version deleted]]

