在 R Markdown 中使用 ggplot2
的 geom_smooth
时,我得到了评论
## `geom_smooth()` using formula 'y ~ x'
即使我在代码块 header 中包含 echo = FALSE, warning = FALSE, messages = FALSE
:
我怎样才能摆脱它?
例子:
---
title: "Test"
output: ioslides_presentation
---
## Title
```{r cars, echo = FALSE, warning = FALSE, messages = FALSE}
library(ggplot2)
ggplot(cars, aes(speed, dist)) +
geom_point() +
geom_smooth(method=lm)
```
最佳答案
在您的代码中,您使用了 messages = FALSE
(复数),但它应该是 message = FALSE
。
关于r - 我怎样才能摆脱 Rmd 中 geom_smooth 的评论?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62635689/