[R] Packages sometimes don't update, but no error or warning is thrown

peter dalgaard pd@|gd @end|ng |rom gm@||@com
Mon Feb 19 19:50:57 CET 2024


Is it possible that there is a version skew between binaries and source packages?

If you try the RStudio Update option, which versions does it claim that you have installed? If it is the same versions that you download, then no wonder that the update doesn't change anything.

E.g. I see that you have been downloading survival_3.5-7.tgz for arm64, but this is now updated to 3.5-8, so maybe it wasn't looking at available binaries, but possibly at available source packages.

-pd

> On 16 Feb 2024, at 17:35 , gernophil--- via R-help <r-help using r-project.org> wrote:
> 
> Hey everyone,
> 
> Thanks for all the input. It's happening again. This time for the packages "DBI", "parallelly", "segmented", "survival", "V8". So, RStudio shows updates for those and updating them via RStudio leads to this output:
> ```
>> install.packages(c("DBI", "parallelly", "segmented", "survival", "V8"))
> trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/DBI_1.2.0.tgz'
> Content type 'application/x-gzip' length 822755 bytes (803 KB)
> ==================================================
> downloaded 803 KB
> 
> trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/parallelly_1.36.0.tgz'[https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/parallelly_1.36.0.tgz']
> Content type 'application/x-gzip' length 349831 bytes (341 KB)
> ==================================================
> downloaded 341 KB
> 
> trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/segmented_2.0-2.tgz'[https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/segmented_2.0-2.tgz']
> Content type 'application/x-gzip' length 1210146 bytes (1.2 MB)
> ==================================================
> downloaded 1.2 MB
> 
> trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/survival_3.5-7.tgz'[https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/survival_3.5-7.tgz']
> Content type 'application/x-gzip' length 7101721 bytes (6.8 MB)
> ==================================================
> downloaded 6.8 MB
> 
> trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/V8_4.4.1.tgz'[https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/V8_4.4.1.tgz']
> Content type 'application/x-gzip' length 10093069 bytes (9.6 MB)
> ==================================================
> downloaded 9.6 MB
> 
> 
> The downloaded binary packages are in
> /var/folders/ws/XXX/T//YYY/downloaded_packages
> ```
> 
> After that, all the packages are still updatable. No warning, no error, but also no updated packages. utils::install.packages(c("DBI", "parallelly", "segmented", "survival", "V8")) leads to the exact same output. The only difference, if I run it directly from command-line is, that I have to select a mirror. After that it's again the same output. The DBI package for example is installed with version 1.2.0, which is the latest available macOS arm64 binary. However, there is an update available for other binaries or source. So, I guess in the end, it's not the install.packages() that is failing, but the check for updates from RStudio. On the other hand, shouldn't there be at least a warning that there are new updates available, just no new binaries.
> 
> Best,
> Philipp
> 
>  
>  
>  
> 
> Gesendet: Mittwoch, 14. Februar 2024 um 18:44 Uhr
> Von: "Duncan Murdoch" <murdoch.duncan using gmail.com>
> An: "Martin Maechler" <maechler using stat.math.ethz.ch>, "Berwin A Turlach" <berwin.turlach using gmail.com>
> Cc: "gernophil--- via R-help" <r-help using r-project.org>
> Betreff: Re: [R] Packages sometimes don't update, but no error or warning is thrown
> On 14/02/2024 5:50 a.m., Martin Maechler wrote:
>>>>>>> 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[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...
> 
> Did they ignore your bug report?
> 
> Duncan Murdoch
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help[https://stat.ethz.ch/mailman/listinfo/r-help][https://stat.ethz.ch/mailman/listinfo/r-help[https://stat.ethz.ch/mailman/listinfo/r-help]]
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html[http://www.R-project.org/posting-guide.html][http://www.R-project.org/posting-guide.html[http://www.R-project.org/posting-guide.html]]
> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes using cbs.dk  Priv: PDalgd using gmail.com



More information about the R-help mailing list