Graphics Reference
In-Depth Information
am 0.60 -0.52 -0.59 -0.24 0.71 -0.69 -0.23 0.17 1.00 0.79 0.06
gear 0.48 -0.49 -0.56 -0.13 0.70 -0.58 -0.21 0.21 0.79 1.00 0.27
carb -0.55 0.53 0.39 0.75 -0.09 0.43 -0.66 -0.57 0.06 0.27 1.00
If there are any columns that you don't want used for correlations (for example, a column of
names), you should exclude them. If there are any NA cells in the original data, the resulting cor-
relation matrix will have NA values. To deal with this, you will probably want to use the option
use="complete.obs" or use="pairwise.complete.obs" .
To graph the correlation matrix ( Figure 13-1 ), we'll use the corrplot package, which first must
be installed with install.packages("corrplot") :
library(corrplot)
corrplot(mcor)
Search WWH ::




Custom Search