Stuck in update/install.packages loop on Windows

Hi,

I have several students who use Windows and are running into a problem when trying to install packages and update their R versions. They both are running R 4.2.2 and I recommended using updateR() from the installr package, but when they try to install the package, it says it was build under R 4.2.3 and updateR() hangs.

However, on the installr page on CRAN, it says

Depends: R (≥ 2.14.0)

which suggests it shouldn't matter if they're running R 4.2.2.

Any ideas of what I could suggest to them aside from reinstalling from scratch?

I think these two things might be unrelated, and it is impossible to tell why the package hangs without debugging it.

Nevertheless, I don't recommend using the installr package, as it has some rather questionable choices when it comes to package libraries. E.g. creating a "global" package library at a non-standard place, copying packages between R versions, even if those packages are not incompatible with the target R version.

Some modern alternatives are rig (GitHub - r-lib/rig: The R Installation Manager) for installing R and pak (All about installing pak. — Installing pak • pak) for installing packages. If you install R with rig, it'll automatically install pak.

The documentation you linked seems to suggest that you can install the version of pak that corresponds to your R version

install.packages("pak", repos = sprintf(
  "https://r-lib.github.io/p/pak/stable/%s/%s/%s",
  .Platform$pkgType,
  R.Version()$os,
  R.Version()$arch
))

but only if you have a development version of R — is that correct?

I ask because my students may not have enough experience to use the alternative installation approaches mentioned there.

No, that page says:

This is supported for the following systems:

OS CPU R version
Linux x86_64 R 3.4.0 - R-devel
Linux aarch64 R 3.4.0 - R-devel
macOS High Sierra+ x86_64 R 3.4.0 - R-devel
macOS Big Sur+ aarch64 R 4.1.0 - R-devel
Windows x86_64 R 3.4.0 - R-devel

I.e. on any R version between R 3.4.0 and R-devel (currently R 4.5.0), on Windows.

I see — thanks for the clarification! I'll see if this can get them up an running again.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.