[R] suppress output of neural network for use in Sweave

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jun 16 01:39:50 CEST 2005


On 6/15/05, Barry Rowlingson <B.Rowlingson at lancaster.ac.uk> wrote:
> Thorstensen Nicolas wrote:
> > Hi!
> >
> > How can I suppress the output of the function nnet in the library(nnet) ?
> 
>  ?nnet suggests adding trace=FALSE to the arguments.
> 
>  In other cases if functions dont have this sort of option then on a
> Unix box you can wrap your function calls in sink("/dev/null") [do
> stuff] sink() to send output to a black hole. Not sure what the Windows
> equivalent is.


A general way OS independent way to turn off output is via 
capture.output:

	invisible(capture.output(...whatever...))




More information about the R-help mailing list