[R] silent loading of packages

Gabor Grothendieck ggrothendieck at gmail.com
Tue Jan 30 21:37:32 CET 2007


Try this.  We first load the dependent packages to avoid the loading message:

library(splines)
library(stats4)
library(VGAM, warn.conflicts = FALSE)

On 1/30/07, johan Faux <johanfaux at yahoo.com> wrote:
> I would like to turn off all the messages during
> library(aPackage) or
> require(aPackage)
>
> I tried different commands: invisible, capture.output, sink but none of them is working.
>
> For example, loading VGAM, gives a lot of unnecessary messages:
>
> > library(VGAM)
>
> Attaching package: 'VGAM'
>
>
>        The following object(s) are masked from package:splines :
>
>         bs
>
>        The following object(s) are masked from package:splines :
>
>         ns
>
>
>        The following object(s) are masked from package:boot :
>
>         logit
>
>        The following object(s) are masked from package:boot :
>
>         simplex
>
>
>        The following object(s) are masked from package:stats :
>
>         glm
>
>        The following object(s) are masked from package:stats :
>
>         lm
>
>        The following object(s) are masked from package:stats :
>
>         poly
>
>        The following object(s) are masked from package:stats :
>
>         predict.glm
>
>        The following object(s) are masked from package:stats :
>
>         predict.lm
>
>        The following object(s) are masked from package:stats :
>
>         predict.mlm
>
>
>        The following object(s) are masked from package:base :
>
>         scale.default
>
>
>
> Any hint/help will be appreciated.
>
>
>
>
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list