O'Reilly logo

Data Analysis with R - Second Edition by Tony Fischetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

More than two continuous variables

Finally, there is an excellent way to visualize correlation matrices like the one we saw with the iris dataset in the section, Comparing multiple correlations. To do this, we have to install and load the corrgram package as follows:

 install.packages("corrgram") 
 library(corrgram) 
 
 corrgram(iris, lower.panel=panel.conf, upper.panel=panel.pts) 
 

After installing the corrgram :

Figure 3.13: A corrgram of the iris dataset's continuous variables

With corrgrams, we can exploit the fact that correlation matrices are symmetrical by packing in more information. On the lower left panel, we have the Pearson correlation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required