I am using RStudio to run this code, not sure if that makes any difference? Update: I have tried to examine the stat_cor function and found the following code: function (mapping = NULL, data = NULL, method = "pearson", cor.coef.name = c("R", "rho", "tau"), label.sep = ",...