如何摆脱 Rmd 中 geom_smooth 的评论?

tim*_*927 1 r ggplot2 knitr r-markdown

在 R Markdown 中使用ggplot2's 时geom_smooth,我得到了评论

## `geom_smooth()` using formula 'y ~ x'
Run Code Online (Sandbox Code Playgroud)

即使我echo = FALSE, warning = FALSE, messages = FALSE在代码块头中包含:

评论和 ggplot

我怎样才能摆脱它?

例子:

---
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)
```
Run Code Online (Sandbox Code Playgroud)

小智 6

在您的代码中,您使用了messages = FALSE(复数),但它应该是message = FALSE