I'm running an Rmarkdown code:
library(ggplot2)
library(dplyr)
library(tidyverse)
library(datasets)
Where I uyse the "dplyr" package, every time I knit the code and the PDF is produced the following warning is printed alongside the PDF. How do I get rid of it?
#
## Attaching package: ’dplyr’
## The following objects are masked from ’package:stats’:
##
## filter, lag
## The following objects are masked from ’package:base’:
##
## intersect, setdiff, setequal, union
## -- Attaching packages --------------------------------------- tidyverse 1.3.2 --
## v tibble 3.1.8 v purrr 0.3.4
## v tidyr 1.2.0 v stringr 1.4.0
## v readr 2.1.2 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
CodePudding user response:
This is no error, just some warnings. One option to suppress the warnings in the output would be to add message=FALSE
to the code chunk, {r, message=FALSE}
.
Note: As dplyr and ggplot2 are part of the tidyverse
package there is no need to attach them separately.
---
title: "Untitled"
output: pdf_document
date: "2022-09-10"
---
```{r, message=FALSE}
library(tidyverse)
library(datasets)
```
Some text