Using Rscript, is there a decent way to suppress the non-script output?

Viewed 8624

Possible Duplicate:
R suppress startupMessages from dependency

I've read about using sink("NUL") / sink("/dev/null"), but neither of them has fixed the problem I'm having. Even if I wrap the library() commands in sink("NUL") and sink(), my call to Rscript outputs all manner of information I don't want to see:

Loading required package: Matrix
Loading required package: methods
Loading required package: lattice
Loaded glmnet 1.8

Loading required package: MASS
Loading required package: lme4

Attaching package: 'lme4'

The following object(s) are masked from 'package:stats':

    AIC, BIC

Loading required package: R2WinBUGS
Loading required package: coda

Attaching package: 'coda'

The following object(s) are masked from 'package:lme4':

    HPDinterval

Loading required package: abind
Loading required package: foreign

arm (Version 1.5-05, built: 2012-6-6)

Working directory is C:/Users/andrews/bootstraps/user/_branches/ER-PoC/Bootstraps/R


Attaching package: 'arm'

The following object(s) are masked from 'package:coda':

    traceplot

[1] "client=51"         "date='01-01-2011'"
[1] "01-01-2011"
[1] 51

The stuff at the end is the only output I actually want, and also the only output I seem able to suppress with sink() commands. It really seems like there should just be an argument to Rscript that suppresses this output (which doesn't even show up if I source my script in the console)... any input?

1 Answers
Related