I am trying to create a correlation matrix using GGpairs, the scatterplots are coloured by group (reg or irreg). The correlation values plotted on the upper corner are not a
This seems to work:
ggpairs(data=dat4, columns=1:5, title="correlation matrix", mapping= aes(colour = irregular), lower = list( continuous = "smooth", combo = "facetdensity", mapping = aes(color = irregular)), upper = list(continuous = wrap("cor", size = 3, hjust=0.8)))