A correlogram or correlation matrix allows to analyse the relationship between each pair of numeric variables in a dataset. It gives a quick overview of the whole dataset. It is more used for exploratory purpose than explanatory.
GGally
packageThe GGally
package offers great options to build correlograms. The ggpairs()
function build a classic correlogram with scatterplot, correlation coefficient and variable distribution. On top of that, it is possible to inject ggplot2 code, for instance to color categories.
corrgram
packageThe corrgram
is another great alternative to build correlograms. You can choose what to display in the upper, lower and diagonal part of the figure: scatterplot, pie chart, text, ellipse and more.
Lesser known ways to build correlogram with R, like the ellipse
package, the plot()
function and the car
package.