相关系数矩阵 corrgram

1
2
3
4
5
6
7
8
9
install.packages(corrgram)
library(corrgram)
library(mtcarData)
library(mtcar)
corrgram(mtcars, order=TRUE, lower.panel=panel.ellipse,
upper.panel=panel.pts, text.panel=panel.txt,
diag.panel=panel.minmax,
main="Corrgram of mtcars data using scatter plots
and ellipses")

Corrgram of mtcars data using scatter plots and ellipses.png

1
2
3
4
5
6
cols <- colorRampPalette(c("darkgoldenrod4", "burlywood1",
"darkkhaki", "darkgreen"))
corrgram(mtcars, order=TRUE, col.regions=cols,
lower.panel=panel.shade,
upper.panel=panel.conf, text.panel=panel.txt,
main="A Corrgram (or Horse) of a Different Color")

A Corrgram (or Horse) of a Different Color.png