• Welcome to LiuJason's Blog!

R语言ggplot2中添加p-value值

R语言 Jason 6 years ago (2019-02-28) 1517 Views 0 Comments QR code of this page

在ggplot里面加上下面的代码即可

stat_fit_glance(method = 'lm',
                method.args = list(formula = formula),
                geom = 'text',
                aes(label = paste("p = ", signif(..p.value.., digits = 4), sep = "")), size = 2)+

 


This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/225.html
Like (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址