0

I upgraded RStudio version to 3.6.3 and have endless issues installing the packages. I have never experienced that before and I am not an expert, so it has been a huge struggle. I posted a question on StackOverflow (Trouble installing package ‘export’ after upgrading R version. Is there an alternative to this package?) with several updates in the comments... The issues are always similar: it seems that the package is being loaded, but then it is not available.

For example:

** package 'dbplyr' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** 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
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'dbplyr'
* removing 'C:/Users/...../Documents/R/win-library/3.6/dbplyr'
Warning in install.packages :
  installation of package ‘dbplyr’ had non-zero exit status


    > install.packages('Rtools ')
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/..../Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘Rtools ’ is not available (for R version 3.6.3)




user7395965
  • 397
  • 5
  • 17
  • 2
    RTools is not a package ... you can install it from https://cran.r-project.org/bin/windows/Rtools/ . But it is probably easier of you use package binaries. – user20650 Sep 09 '22 at 18:47
  • 1
    ... hmm reading the messages suggests to try to install rlang with version >= 1.0.0 – user20650 Sep 09 '22 at 18:48
  • 3
    upgrading R (not RStudio, version 3.6.3 looks very much like an R version number and not an RStudio version: RStudio versions look like v1.4.1106-5 or v2022.07.0+548.pro5) to 3.6.3 is a bit odd, as it's still a very old version. Is there a reason you can't upgrade to a *current* (or at least more recent) version of R (e.g., at least > 4.0, current version is 4.2.1)? That will make things **much** easier ... – Ben Bolker Sep 09 '22 at 19:21
  • I have not used RStudio for a few months and when I opened it it suggested an update. So I said OK. I will try to figure out how to upgrade R. Here is what I see in RStudio Console: > version .... version.string R version 3.6.3 (2020-02-29) – user7395965 Sep 09 '22 at 19:49
  • 1
    To download R see https://cran.r-project.org/bin/windows/base/ . Just click through the installer. Rstudio should find the most recent R version – user20650 Sep 09 '22 at 19:59
  • Thank you so very much! I installed a new R version, so RStudio was upgraded and everything works! – user7395965 Sep 09 '22 at 20:41

0 Answers0