R: How to suppress package startup messages

suppressPackageStartupMessages(library(fields))

And you can still test the result of the `library` or `require` calls:

a = suppressPackageStartupMessages(require(fields))

Variable ‘a’ will be TRUE if it was successful, FALSE otherwise.

Unknown's avatar

About joelgranados

I'm fascinated with how technology and science impact our reality and am drawn to leverage them in order to increase the potential of human activity.
This entry was posted in R and tagged , , , . Bookmark the permalink.

2 Responses to R: How to suppress package startup messages

  1. Rajaraman's avatar Rajaraman says:

    suppressPackageStartupMessages(library(lattice)) does not work within knitr. Any idea why ?

Leave a reply to Rajaraman Cancel reply