I have imported 9 columns of data using read.csv function calling the object myData and plotted it using the pairs function as below.
pairs(myData[,c(1:9)],
lower.panel = panel.smooth,
diag.panel = NULL,
pch=1, cex= 1,
cex.labels = 1,
cex.axis = 1,
gap = 0.35,
font.labels = NULL,
col="Black")
What I was hoping is to put the persons correlation of the different plots as a heat map on the matrix scatter plot as the individual scatter plot background colour. The function required for calculating the pearson correlation is below
cor(myData, method = "pearson")
This function gives the numbers I need (to construct a heat map) but I have no idea how to colour individual plots in the lower.panel argument based on persons value generated.