I used ggpairs to show the correlation between 10 parameters and it came out nicely. However, when I tried using ggcorr, only a few correlation number showed up, which the results were similar to using cor().
I wonder what are the differences between the calculation method between ggpairs and ggcorr?
Thanks!
Hard to tell without reproducible example, but both methods rely on the same defaults: pairwise and pearson. So if you are not changing those defaults it should give similar findings. For displaying coefficients, ggcorr rounds to 1 decimal and ggpairs rounds to 3. Specifying ggcorr to round to three digits gives the same result:
ggcorr(iris, label = TRUE, label_round = 3)
ggpairs(iris)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.