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.

Advertisements

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 says:

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s