Thanks! I'm using Mac 10.6.2. This did it:
~/Documents > cat test.r
#! /usr/bin/Rscript --vanilla --default-packages=utils
suppressMessages(require(Hmisc))
suppressMessages(require(gsubfn))
a <- 1:100
print(a)
~/Documents > Rscript test.r > /dev/null
~/Documents >
-J
2010/1/3 Prof Brian Ripley
On Sat, 2 Jan 2010, johannes rara wrote:
How can I suppress ALL output when running Rscript in Terminal?
~/Documents>Rscript test.r
Rscript test.r >& /dev/null
or equivalent in your shell. But note that Rscript produces no
output itself:
tystie% touch test.r
tystie% Rscript test.r
tystie
Try this on Windows:
Rscript test.r 1>NUL 2>NUL
On Sat, Jan 2, 2010 at 3:27 PM, johannes rara wrote:
> How can I suppress ALL output when running Rscript in Terminal?
>
> ~/Documents>Rscript test.r
>
> I tried options --slave, --vanilla with no success. I get these
>
> Loading required package:
How can I suppress ALL output when running Rscript in Terminal?
~/Documents>Rscript test.r
I tried options --slave, --vanilla with no success. I get these
Loading required package: methods
..etc..
and other output as well.
-J
> sessionInfo()
R version 2.9.2 (2009-08-24)
i386-apple-darwin8.11.
4 matches
Mail list logo