0

I am having trouble downloading certain packages on my new work computer (Windows with R version 3.6.3). When I try downloading packages that have needs_compilation=FALSE,

There are binary versions available but the source versions are later:
        binary source needs_compilation
rlang   0.4.11  1.0.3              TRUE
scales   1.1.1  1.2.0             FALSE
ggplot2  3.3.3  3.3.6             FALSE

I get the following error messages: ....

  • installing source package 'scales' ... ** package 'scales' successfully unpacked and MD5 sums checked ** using staged installation ** R ** byte-compile and prepare package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    namespace 'rlang' 0.4.11 is being loaded, but >= 1.0.0 is required Kald: ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace Loading stopped ERROR: lazy loading failed for package 'scales'
  • removing 'C:/Users/lesor/Documents/R/win-library/3.6/scales' ERROR: dependency 'scales' is not available for package 'ggplot2'
  • removing 'C:/Users/lesor/Documents/R/win-library/3.6/ggplot2'

I am able to download packages like dplyr (which have need_compilation=TRUE), however these error messages show up for packages like knitr, rmarkdown, ggplot2 (which have need_compilation=FALSE). I have tried updating packages in global options, uninstalling and reinstalling R, installing packages in R instead of Rstudio, but nothing has worked so far. Would greatly appreciate any help.

Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
Lene
  • 23
  • 4
  • 1
    (Always my emphasis) 1) You say *" new work computer (Windows with R version **3.6.3**)"* but the current R version is **4.2.1**. Time to upgrade R? 2) The error message says *"namespace 'rlang' **0.4.11** is being loaded, but >= **1.0.0** is required"*. Open a terminal window and run `R -q -e "install.packages('rlang')"`. 3) Reinstall package `scales`. 4) Exit the IDE, if you're running R on one and reopen it. – Rui Barradas Jul 09 '22 at 11:01
  • The 3.6.3 version was the only one offered for me to download using the work software center (limited access to download stuff). I did step 2) and 3) in R (not rstudio), but the only rlang version downloaded is the binary 0.4.11. How do I get the 1.0.0 source version? – Lene Jul 09 '22 at 12:57
  • [Installing older version of R package](https://stackoverflow.com/questions/17082341/installing-older-version-of-r-package) will allow you to install package versions compatible with R 3.6.3. I think this is your best option. Try installing `ggplot2` version 3.3.0 – Rui Barradas Jul 09 '22 at 15:27

0 Answers0