GGpairs, correlation values are not aligned

后端 未结 1 987
眼角桃花
眼角桃花 2021-01-15 06:18

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

相关标签:
1条回答
  • 2021-01-15 06:47

    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)))
    

    0 讨论(0)
提交回复
热议问题