0

I am creating an R Markdown file for a report.

In a code chunk, I have written:

library("tidyverse")

I have tried the various options from this Stack Overflow question but I cannot seem to hide the following lines:

## v ggplot2 3.3.2     v purrr   0.3.4
## v tibble  3.0.4     v dplyr   1.0.2
## v tidyr   1.1.2     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.0

and separately:

## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()

I have tried:

  • results='markup'
  • message="FALSE"
  • warning="FALSE"

I want to show the code, but not the information that it returns.

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
Alex
  • 627
  • 3
  • 12
  • 32

1 Answers1

0

I make all my code chunks as follows to suppress warnings and messages:

```{r, echo=FALSE, warning=FALSE,message=FALSE}
Ben
  • 1,113
  • 10
  • 26