# NOT RUN {
data(meuse, package = "sp")
cols <- c("cadmium", "copper", "lead", "zinc", "elev", "dist", "om")
# A single correlation matrix
r <- cor(meuse[1:20, cols], use = "complete")
r <- round(r, 2)
plotCor(r)
# Two correlation matrices: r2 goes in the upper triangle
r2 <- cor(meuse[21:40, cols], use = "complete")
r2 <- round(r2, 2)
plotCor(r, r2)
# }
Run the code above in your browser using DataLab