Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite stat_cor() to make formatting easy for p-value and cor.coef #270

Closed
kassambara opened this issue May 9, 2020 · 1 comment
Closed

Comments

@kassambara
Copy link
Owner

Related issue: #114 and #186

kassambara added a commit that referenced this issue May 10, 2020
kassambara added a commit that referenced this issue May 10, 2020
kassambara added a commit that referenced this issue May 10, 2020
@kassambara
Copy link
Owner Author

suppressPackageStartupMessages(library(ggpubr))
# Default plot
sp <- ggscatter(mtcars, x = "wt", y = "mpg", add = "reg.line")
sp + stat_cor(label.x = 3)
#> `geom_smooth()` using formula 'y ~ x'

# Specify the number of decimal places of precision for 
# the p-value and the correlation coefficient r
sp + stat_cor(label.x = 3, p.accuracy = 0.001, r.accuracy = 0.01)
#> `geom_smooth()` using formula 'y ~ x'

Created on 2020-05-10 by the reprex package (v0.3.0.9001)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant