8.3 ggcorrplot package

  • The ggcorrplot function in the ggcorrplot package can be used to visualize these correlations.

  • By default, it creates a ggplot2 graph were darker red indicates stronger positive correlations, darker blue indicates stronger negative correlations and white indicates no correlation.

library(ggplot2)
library(ggcorrplot)
ggcorrplot(r)