[R] suppress startup messages from default packages

Andreas Leha andreas.leha at med.uni-goettingen.de
Mon Jul 15 22:27:11 CEST 2013


Hi David,

David Winsemius <dwinsemius at comcast.net> writes:

> On Jul 15, 2013, at 4:11 AM, Andreas Leha wrote:
>
>> Hi all,
>> 
>> several packages print messages during loading.  How do I avoid to see
>> them when the packages are in the defaultPackages?
>
> I'm pretty sure this has been asked before (although the wrinkle of
> adding a package to default packages may not have been part of that
> discussion.)  Have you done any searching of the Archives?
>> 
>> 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?
>
> On my machine typing suppress<tab> brings up an option of:
>
>  suppressPackageStartupMessages
>
> You should append a leading "?" and read further.

I have only just now gotten your answer.  Thanks for responding.

As I already said in response to another message [fn:1] the 'wrinkle of
adding a package to default packages' is what my question really is
about.  Sorry if I was unclear.

Thanks to a very helpful answer proposing a solution using hooks [fn:2],
I was actually able to solve my 'problem' with the filehash package.

Regards,
Andreas


Footnotes:

[fn:1] http://permalink.gmane.org/gmane.comp.lang.r.general/296275

[fn:2] http://permalink.gmane.org/gmane.comp.lang.r.general/296281



More information about the R-help mailing list