0

I have used library(readxl,warn.conflicts = F) in my R-markdown file but the warning messages are still displayed in my knitted file. Same is the case when the code is executed in R program.

Tried library(readxl,warn.conflicts = F) code but the warnings are displayed.

library(readxl,warn.conflicts = F) #Warnings are displayed
library(dplyr,warn.conflicts = F) #Warnings are displayed
library(tidyverse,warn.conflicts = T) #Warnings are displayed

To hide the warning and other messages while we load the library. In R-Markdown/R code output, I would like to display the library name but without any warning messages.

nicola
  • 24,005
  • 3
  • 35
  • 56
  • `suppressMessages(library(readxl))` or something like that? – NelsonGon Jul 03 '19 at 07:52
  • 1
    You have to set the options on the code chunk. Take a look at [this post](https://stackoverflow.com/questions/13090838/r-markdown-avoiding-package-loading-messages) – patL Jul 03 '19 at 07:53
  • 2
    Possible duplicate of [R - Markdown avoiding package loading messages](https://stackoverflow.com/questions/13090838/r-markdown-avoiding-package-loading-messages) – NelsonGon Jul 03 '19 at 07:55
  • You also need to set `conflicts.policy`, read more in `help(library)`. – NelsonGon Jul 03 '19 at 07:57

0 Answers0