Issues with RStudio version 3.6.3: troubles installing packages - r

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)

Related

I'm getting an error when installing brms R package

I'm trying to install "brms" package but keep getting an error.
First, I installed "brms" package, and then call the package from the library.
I'm getting the following error message. "Error in library(brms) : there is no package called ‘brms’
Can someone help me?
install.packages("brms")
Installing package into ‘C:/Users/.......’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
brms 2.17.0 2.18.0 FALSE
installing the source package ‘brms’
trying URL 'https://cran.rstudio.com/src/contrib/brms_2.18.0.tar.gz'
Content type 'application/x-gzip' length 4486548 bytes (4.3 MB)
downloaded 4.3 MB
* installing *source* package 'brms' ...
** package 'brms' successfully unpacked and MD5 sums checked
** using staged installation
** R
Warning: namespace 'brms' is not available and has been replaced
by .GlobalEnv when processing object 'brmsfit_example1'
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Warning message:
package 'Rcpp' was built under R version 4.0.5
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'Brobdingnag'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'brms'
* removing 'C:/Users/....'
Warning in install.packages :
installation of package ‘brms’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\....\downloaded_packages’
library(brms)
Error in library(brms) : there is no package called ‘brms’
In that case, you probably didn't let the 'install' step finish. That package has a lot of dependencies. Try install.packages("brms") again and wait for it to finish.

Problem with installation of devtools package

this is the warning massage I get.
If anyone has an idea If anyone has an idea how to help me, I would greatly appreciate it.
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/
There is a binary version available but the source version is later:
binary source needs_compilation devtools 2.4.4 2.4.5 FALSE
installing the source package ‘devtools’
trying URL
'https://cran.rstudio.com/src/contrib/devtools_2.4.5.tar.gz' Content
type 'application/x-gzip' length 374718 bytes (365 KB) downloaded 365
KB
* installing *source* package 'devtools' ...
** package 'devtools' 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 'htmltools' 0.5.2 is being loaded, but >= 0.5.4 is required
Calls: <Anonymous> ... namespaceImport -> loadNamespace ->
namespaceImport -> loadNamespace Execution halted ERROR: lazy loading
failed for package 'devtools'
* removing 'C:/Program Files/R/R-4.1.3/library/devtools' Warning in install.packages : installation of package ‘devtools’ had non-zero
exit status
I tried to install the package without success. I did not find a guide on the Internet that solved my problem

Devtools not installing, non-zero exit status

I'm very new to R and I've been trying to install CRAN "devtools" package in R, version 4.1.2 and keep getting the following error message (I am on a Windows 11 computer, 64-bit):
> install.packages("devtools")
Installing package into ‘C:/Users/court/OneDrive/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
installing the source package ‘devtools’
trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.4.5.tar.gz'
Content type 'application/x-gzip' length 374718 bytes (365 KB) downloaded 365 KB
* installing *source* package 'devtools' ...
** package 'devtools' successfully unpacked and MD5 sums checked **
using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading
Warning message: package 'usethis' was built under R version 4.1.3
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace 'htmltools' 0.5.2 is being loaded, but >= 0.5.4 is required
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'devtools' * removing 'C:/Users/court/OneDrive/Documents/R/win-library/4.1/devtools'
Warning in install.packages : installation of package ‘devtools’ had non-zero exit status The downloaded source packages are in ‘C:\Users\court\AppData\Local\Temp\RtmpSGwqVR\downloaded_packages’
Does anyone have any input about how to solve this issue?
Thanks in advance!
I installed the rtools package relevant to my computer but that didn't work. I also ran RStudio as an administrator and it didn't work either.

Failure to install tidyverse package in R: "namespace 'tidyselect' 1.1.0 is being loaded, but >= 1.1.1 is required"

I'm trying to install "tidyverse" package in R using install.packages("tidyverse"), but it returns the following error:
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/franc/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
tidyverse 1.3.1 1.3.2 FALSE
installing the source package ‘tidyverse’
tentando a URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.2.tar.gz'
Content type 'application/x-gzip' length 702514 bytes (686 KB)
downloaded 686 KB
* installing *source* package 'tidyverse' ...
** package 'tidyverse' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'tidyselect' 1.1.0 is being loaded, but >= 1.1.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'tidyverse'
* removing 'C:/Users/franc/OneDrive/Documents/R/win-library/4.0/tidyverse'
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\franc\AppData\Local\Temp\RtmpiqAHM6\downloaded_packages’
For some reason the installation doesn't work. I've also tried using install.packages('tidyverse', type = 'binary'), but it installs an older version that is incompatible with some packages I have to use.

Trouble downloading packages that have needs_compilation=FALSE

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.

Resources