[R] Silencing the output of install.packages()

R. Michael Weylandt michael.weylandt at gmail.com
Fri Jul 6 00:12:01 CEST 2012


On Thu, Jul 5, 2012 at 1:03 PM, craigcitro <craigcitro at gmail.com> wrote:
>>> Is there a way to suppress the output of 'install.packages()'? I have
>>> seen that the 'download.file' function has a 'quiet' option but I do
>>> not know how to use it.
>>
>> I do not see any good reason to allow that. A user should see if
>> software is being installed.
>
> Hi Uwe,
>
> I have a proposed use-case. We run a series of unit tests in R, and want to
> plug them into various continuous build/test frameworks. Part of our system
> involves being able to install packages, so we need to actually run a unit
> test that uses `install.packages`. For better or worse, many of these depend
> on parsing the output of a test run; it's a lot of silly work to make them
> parse the additional `install.packages` output (as opposed to the much
> simpler `[\w]+: \.+` output from something like testthat in the case of
> success).
>
> Two questions:
>  * Is there another workaround? I'm planning on some ugly hackery on our
> side to deal with this, but would love something cleaner.
>  * If I were willing to write the patch, would turning these statements into
> something we could suppress be acceptable for R?

I think this has already been done in r59493ff of the svn repos by the
indefatigable Prof. Ripley

Best,
Michael

>
> Thanks!
> -cc
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Silencing-the-output-of-install-packages-tp4631947p4635525.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.



More information about the R-help mailing list