From davidhughjones at gmail.com  Sun Mar  4 10:40:19 2018
From: davidhughjones at gmail.com (David Hugh-Jones)
Date: Sun, 4 Mar 2018 09:40:19 +0000
Subject: [Rd] Fwd: install.packages doesn't produce warnings unless
 qualified with utils::
In-Reply-To: <CAARY7kgx4h7_0zQkNXrfO+r3LEopBJkHQHDg9P2PCAd8qXAFBg@mail.gmail.com>
References: <CAARY7kgJNpGOB1HhTzVWVFnwwh-AH=r8Ke7678XPM-snpp99xA@mail.gmail.com>
 <CAPPM_gRzeLntvQm6NQLLasaJuR2pLU89Z4qwpuMX9uy0Y5218A@mail.gmail.com>
 <CAARY7kgx4h7_0zQkNXrfO+r3LEopBJkHQHDg9P2PCAd8qXAFBg@mail.gmail.com>
Message-ID: <CAARY7kjp7FhmjVYOgFUgC_fkfBr81+gHeD-90mFCVsO0WTfygQ@mail.gmail.com>

On Sat, 3 Mar 2018 at 20:01, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:

>
> >
> My guess is that something (a package, console, etc) is masking
> utils::install.packages().
>
>
This looks about right. On R in the terminal the warning is thrown. In
Rstudio I have the problem, and:

 > getAnywhere('install.packages')
2 differing objects matching ?install.packages? were found
in the following places
  package:utils
  namespace:utils
Use [] to view one of them

And the version in package.utils looks like:

function (...)
.rs.callAs(name, hook, original, ...)

OK, so an RStudio issue. Indeed, this looks like the problem:

https://github.com/rstudio/rstudio/blob/master/src/cpp/r/R/Tools.R

There, callAs is defined as running a function with error handlers which
use `cat` to reprint warnings.

Thanks!
David
-- 
Sent from Gmail Mobile

	[[alternative HTML version deleted]]



[Rd] Fwd: install.packages doesn't produce warnings unless qualified with utils::
David Hugh-Jones