Dear all
Is there an easy way to display only one half (top-right or
bottom-left) of a correlation matrix?

> 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



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to