tim06927
tim06927

Reputation: 33

How can I get rid of the comment from geom_smooth in Rmd?

When using ggplot2's geom_smooth in R Markdown I get the comment

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

even if I include echo = FALSE, warning = FALSE, messages = FALSE in the code cunks header:

Comment and ggplot

How can I get rid of that?

Example:

---
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)
```

Upvotes: 2

Views: 2692

Answers (1)

melike
melike

Reputation: 96

In your code, you used messages = FALSE (plural), but it should be message = FALSE instead.

Upvotes: 8

Related Questions