One of my R package\'s dependencies displays startup messages when loaded. I would like to suppress these startup messages.
The only fix I found so far was removing
A quick hack to do this inline in a script or environment is to override library()/require() to wrap the suppressPackageStartupMessages() method:
> library(here) # This shows a message
here() starts at /home/z/development/
> require(here) # This shows a message
Loading required package: here
here() starts at /home/y
The workaround:
> flibrary <- library
> library <- function(...) suppressPackageStartupMessages(flibrary(...))
> library(here) # No messages
>
> frequire <- require
> require <- function(...) suppressPackageStartupMessages(frequire(...))
> require(here) # No messages
>