[R] Remove "Loading required package" message

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Aug 31 18:58:56 CEST 2010


On Tue, Aug 31, 2010 at 5:21 PM, Allan Engelhardt <allane at cybaea.com> wrote:
>
>
> On 27/08/10 10:19, Barry Rowlingson wrote:
>>
>> On Fri, Aug 27, 2010 at 9:09 AM, Sébastien Moretti
>> <sebastien.moretti at unil.ch>  wrote:
>>   [...]
>>  require it quietly:
>>
>>
>>>
>>> require(sp,quietly=TRUE)
>>>
>
> Doesn't work for me:
>
>> require("Matrix", quietly=TRUE)
> Loading required package: lattice
>
> Attaching package: 'Matrix'
>
> The following object(s) are masked from 'package:base':
>
>    det
>

Actually it is suppressing the 'Loading required package: Matrix'
message, but not the message from loading 'lattice' the dependency -
perhaps the quietly= option should be passed down to required
packages?

 The other bit, "Attaching package: Matrix etc" only comes up because
of the masking of 'det'. If you also try warn.conflicts=FALSE then
that should stop conflict messages from Matrix, but not from required
packages - possibly because require calls library to do the load, and
that doesn't have 'quietly'... The code is slightly confusing me and
someone else probably knows more. But no, quietly=TRUE is working for
you!

Barry



More information about the R-help mailing list