【问题标题】:How can I get rid of the comment from geom_smooth in Rmd?如何摆脱 Rmd 中 geom_smooth 的评论?
【发布时间】:2020-10-19 11:20:22
【问题描述】:

在 R Markdown 中使用 ggplot2geom_smooth 时,我得到了评论

## `geom_smooth()` using formula 'y ~ x'

即使我在代码 cunks 标头中包含 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)
```

【问题讨论】:

    标签: r ggplot2 r-markdown knitr


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-24
      • 1970-01-01
      相关资源
      最近更新 更多