ger@ophii m@iii@g oii gmx@@et
2024-Feb-13 08:59 UTC
[R] Packages sometimes don't update, but no error or warning is thrown
Hey everyone, ? this question is related to this (https://community.rstudio.com/t/packages-are-not-updating/166214/3), this (https://www.biostars.org/p/9586316/#9586323) and this (https://support.bioconductor.org/p/9156283/#9156308). The two latter ones are pots from myself. ? To sum it up: If I am updating packages (be it via Bioconductor or CRAN) some packages simply don?t update, but they also don?t throw any warning or error that they have not been updated. The reason behind this is most likely that there is an update, but it?s not yet available as a binary ? in my case as a "mac.binary.big-sur-arm64", since I am on Apple Silicon. My pkgType is set to "both" (default), but my .Platform$pkgType is "mac.binary.big-sur-arm64" (also default). ? If the system shows an update is available and I click update (or update via install.packages()), but the package will not be updated, 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. However, the only message I get is: ``` trying URL '<url_to_package>' Content type 'application/x-gzip' length XXXXXXX bytes (X.X MB) =================================================downloaded X.X MB ? ? The downloaded binary packages are in ??????????????? /var/folders/ws/XXX/T//YYY/downloaded_packages ``` To see, if the package was actually updated, I have to check for updates again (or check the version of the installed package). Is this the expected behavior and if so, why? (Also, why is there a double slash in the path to the downloaded packages?) ? Thanks for your help. ? Best, Philipp
Berwin A Turlach
2024-Feb-14 03:47 UTC
[R] Packages sometimes don't update, but no error or warning is thrown
G'day Philipp, On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help <r-help at 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