[R] Is there a way force hiding of all messages when calling library()?

Saiwing Yeung saiwing at berkeley.edu
Thu Dec 22 00:36:09 CET 2011


For example, if I call "library(spam)", I would get messages like this

Package 'spam' is loaded. Spam version 0.27-0 (2011-08-17).
Type demo( spam) for some demos, help( Spam) for an overview
of this package.
Help for individual functions is optained by adding the
suffix '.spam' to the function name, e.g. 'help(chol.spam)'.

Attaching package: ‘spam’

The following object(s) are masked from ‘package:base’:

    backsolve, forwardsolve, norm


While I understand that it's helpful to see these message at times, most of the time I already knew these information, especially when I run things from a script. The bigger problem is that it clutters up the output and makes it harder to notice if there are real problems. I have tried "library(spam, warn.conflicts=T, quietly=F, verbose=F)" but it didn't help at all. Are there other ways to hide these messages? Thank you.



More information about the R-help mailing list