[R] Packages sometimes don't update, but no error or warning is thrown
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Wed Feb 14 11:50:53 CET 2024
>>>>> Berwin A Turlach
>>>>> on Wed, 14 Feb 2024 11:47:41 +0800 writes:
>>>>> Berwin A Turlach
>>>>> on Wed, 14 Feb 2024 11:47:41 +0800 writes:
> G'day Philipp,
> On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help
> <r-help using r-project.org> wrote:
>> this question is related to this
>> (https://community.rstudio.com/t/packages-are-not-updating/166214/3),
>> [...]
>> To sum it up: If I am updating packages (be it via
>> Bioconductor or CRAN) some packages simply don’t update,
>> [...]
>> I would expect any kind of message that the package will
>> not be updated, since no newer binary is available or a
>> prompt, if I want to compile from source.
> RStudio is doing its own thing for some task, including
> 'install.packages()' (and for some reasons, at least on
> the platforms on which I use RStudio, RStudio calls
> 'install.packages()' and not 'update.packages()' when an
> update is requested via the GUI). See:
RStudio> install.packages
> function (...) .rs.callAs(name, hook, original, ...)
> <environment: 0x55bab9293998>
> compared to:
R> install.packages
> function (pkgs, lib, repos = getOption("repos"),
> contriburl = contrib.url(repos, type), method, available =
> NULL, destdir = NULL, dependencies = NA, type =
> getOption("pkgType"), configure.args =
> getOption("configure.args"), configure.vars =
> getOption("configure.vars"), clean = FALSE, Ncpus =
> getOption("Ncpus", 1L), verbose = getOption("verbose"),
> libs_only = FALSE, INSTALL_opts, quiet = FALSE,
> keep_outputs = FALSE, ...) { [...]
> So if you use Install/Update in the Packages tab of
> RStudio and do not experience the behaviour you are
> expecting, it is something that you need to discuss with
> Posit, not with R. :)
>> However, the only message I get is: ``` trying URL
>> '<url_to_package>'
> The package name has the version number encoded in it, so
> theoretical you should be able to tell at this point
> whether the package that is downloaded is the version that
> is already installed, hence no update will happen.
> Best wishes,
> Berwin
Yes, thank's a lot, Berwin.
Indeed I've raised the fact that RStudio
hides R's own install.packages() from the user and uses its
own, undocumented one ... this has been the case for quite a few years.
I found out during teaching --- one of the few times, I use
RStudio to use R... in another case where RStudio's
install.packages() behaved differently than R's.
I'm pretty sure this is reason for quite a bit of confusion...
Martin
More information about the R-help
mailing list