How do I add regression lines to a scatterplot matrix?
问题 How do I go about adding regression lines to a scatterplot matrix? I have the following script: NewNEMSIS = read.csv("NewNEMSIS.csv") library(gclus) newmatrix = NewNEMSIS[,2:5] newmatrix.r = abs(cor(newmatrix)) newmatrix.col = dmat.color(newmatrix.r) area = NewNEMSIS$area cpairs(newmatrix[which(area=="A"),c('Response','SceneToPatient','TotalScene','TotalCall')], panel.colors=newmatrix.col, gap=.5, main="Scatterplot Matrix of City A Times", ylim=c(0,60), xlim=c(0,60), na.omit=TRUE, ) How can I