Re: [R] R CMD BATCH *without* saving output

2014-07-24 Thread Henrik Bengtsson
On *nix like systems: Rscript myscript.R > /dev/null 2>&1 On Windows: Rscript myscript.R > NUL 2>&1 The above sends both standard output ("1") and standard error ("2") to nirvana. I prefer using 'Rscript', but the same works with any command including 'R CMD BATCH'. /Henrik PS. Bill, capture.o

Re: [R] R CMD BATCH *without* saving output

2014-07-24 Thread William Dunlap
You also might try wrapping the call to the scripts with capture.output(). Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Jul 24, 2014 at 9:54 AM, Nick Matzke wrote: > Actually, this was the full solution: > > At the beginning of the script: > > # Suppressing all output/warnings/try errors

Re: [R] R CMD BATCH *without* saving output

2014-07-24 Thread Nick Matzke
Actually, this was the full solution: At the beginning of the script: # Suppressing all output/warnings/try errors: # Open connection to black hole con=file(open="/dev/null") # Don't print anything to screen sink(file=con, type="output") # Don't print messages (e.g. errors/warnings) sink(file=con

Re: [R] R CMD BATCH *without* saving output

2014-07-24 Thread Nick Matzke
On Thu, Jul 24, 2014 at 12:16 PM, Nick Matzke wrote: > Hi all, > > Hi have a series of scripts that print a lot of notes etc. to screen. I > have to run them on a massive set of input files. The scripts are > self-contained and save the important output to data files in an organized > way. I do