[R] suppress startup messages from default packages

Andreas Leha andreas.leha at med.uni-goettingen.de
Mon Jul 15 14:49:48 CEST 2013

Hi Helios,

"Helios de Rosario" <helios.derosario at ibv.upv.es> writes:

>> Hi all,
>> several packages print messages during loading.  How do I avoid to
> see
>> them when the packages are in the defaultPackages?
>> Here is an example.
>> With this in ~/.Rprofile
>> ,----[ ~/.Rprofile ]
>> | old <- getOption("defaultPackages")
>> | options(defaultPackages = c(old, "filehash"))
>> | rm(old)
>> `----
>> I get as last line when starting R:
>> ,----
>> | filehash: Simple key-value database (2.2-1 2012-03-12)
>> `----
>> Another package with (even more) prints during startup is
> tikzDevice.
>>How can I avoid to get these messages?
> There are several options in ?library to control the messages that are
> displayed when loading packages. However, this does not seem be able to
> supress all the messages. Some messages are defined by the package
> authors, because they feel necessary that the user reads them.

Thanks for your answer.  When I actually call library() or require()
myself I can avoid all messages.  There are hacks to do that even for
the very persistent messages [fn:1].

My question is how to suppress these messages, when it is not me who
calls library() or require(), but when the package is loaded during R's
startup through the defaultPackages option.



[fn:1] http://stackoverflow.com/a/8143671/1844418

More information about the R-help mailing list