Re: [R] How to disable output messages (prints or cats) from functions in R?

From: Henrik Bengtsson <hb_at_stat.berkeley.edu>
Date: Fri, 11 Jan 2008 11:34:35 -0800

See capture.output(). /H

On 11/01/2008, Miguel Ratón Almansa <cibermike_at_telefonica.net> wrote:
> Hi everybody,
>
> I have to use a function that shows an output message like "# nonzero
> coefficients ..." followed with a lot of numbers depending on the input.
> This is very annoying because I have to run that function several times
> and I don't want to show this information.
>
> What I want is to disable that display but I don't know how to do it.
> I've tried it with suppressWarnings ( function (...) ) and
> suppressMessages ( function (...) ) but It doesn't work, the function()
> continues printing that information. I tried invisible () too.
>
> Furthermore, this function doesn't have a "verbose" parameter. Thus, I
> can't disable it using a verbose parameter.
>
> I'm sure that there must be some procedure in R to do it but after
> searching through the mailing lists I haven't found anything about it.
>
> Thank you for your help,
> Miguel Ratón Almansa
>
> ______________________________________________
> R-help_at_r-project.org 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.
>



R-help_at_r-project.org 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. Received on Fri 11 Jan 2008 - 19:37:51 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 Jan 2008 - 14:00:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive