Unable to install tidyverse in R - r

I am fairly new to R and just updated to R 4.0
When installing tidyverse I see this:
There is a binary version available but the source version
is later:
binary source needs_compilation
broom 0.5.5 0.5.6 FALSE
package ‘tidyverse’ successfully unpacked and MD5 sums checked
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
Then when trying to load this package
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘broom’
I tried independently installing broom to no avail:
> install.packages("broom")
There is a binary version available but the source version
is later:
binary source needs_compilation
broom 0.5.5 0.5.6 FALSE
installing the source package ‘broom’
Error: unexpected string constant in:
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
Any thoughts on how to clear up this issue?

Related

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.

Tidyverse suddenly disappeared. Error when installing a new tidyverse package

My tidyverse package suddenly disappeared from my Rstudio showing error:
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
But I have been using it everyday! So I tried to install the package again. However, I received error and warning and couldn't install the package:
install.packages("tidyverse")
also installing the dependencies ‘lifecycle’, ‘tidyselect’, ‘rlang’, ‘cli’, ‘dplyr’, ‘vctrs’, ‘dbplyr’
There are binary versions available but the source versions are later:
binary source needs_compilation
lifecycle 1.0.1 1.0.3 FALSE
tidyselect 1.1.2 1.2.0 FALSE
rlang 1.0.2 1.0.6 TRUE
cli 3.2.0 3.4.1 TRUE
dplyr 1.0.8 1.0.10 TRUE
vctrs 0.4.0 0.5.0 TRUE
dbplyr 2.1.1 2.2.1 FALSE
tidyverse 1.3.1 1.3.2 FALSE
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 1.0.2 is being loaded, but >= 1.0.6 is required
ERROR: lazy loading failed for package ‘lifecycle’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/lifecycle’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/lifecycle’
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ 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’ 1.0.2 is being loaded, but >= 1.0.4 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tidyselect’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tidyselect’
Warning in install.packages :
installation of package ‘tidyselect’ had non-zero exit status
* installing *source* package ‘dbplyr’ ...
** package ‘dbplyr’ 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 ‘cli’ 3.2.0 is already loaded, but >= 3.3.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘dbplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/dbplyr’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/dbplyr’
Warning in install.packages :
installation of package ‘dbplyr’ had non-zero exit status
* 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 ‘lifecycle’ 1.0.0 is being loaded, but >= 1.0.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘tidyverse’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/0s/n2561n1s57q5k3tzwf28mqhc0000gn/T/RtmpQrdwuG/downloaded_packages’
What is wrong? The codes below did not work:
(I found on stack overflow as someone said it might work. Not sure the meaning of it.)
sudo apt-get install -y libxml2-dev libcurl4-openssl-dev libssl-dev
It just shows 'Error: unexpected symbol in "sudo apt"'.
Unable to install 'tidyverse'
Want to know how to sort it out

I don't find already installed packages and I'm not able to reinstall..why?

I've always used ggplot2... now R didn't found anymore ggplot2.. so I tried to reinstall the package.. withour success... why??? What should I do?
Also I'm not able to install other packages like lattice extra..
Thank you!
install.packages("ggplot2")
Installing package into ‘C:/Users/vale/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
ggplot2 3.1.1 3.2.1 FALSE
installing the source package ‘ggplot2’
provo con l'URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.2.1.tar.gz'
Content type 'application/x-gzip' length 3204655 bytes (3.1 MB)
downloaded 3.1 MB
* installing *source* package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'colorspace'
ERROR: lazy loading failed for package 'ggplot2'
* removing 'C:/Users/vale/Documents/R/win-library/3.4/ggplot2'
* restoring previous 'C:/Users/vale/Documents/R/win-library/3.4/ggplot2'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\vale\Documents\R\win-library\3.4" C:\Users\vale\AppData\Local\Temp\RtmpgHJKyj/downloaded_packages/ggplot2_3.2.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\vale\AppData\Local\Temp\RtmpgHJKyj\downloaded_packages’
> library(ggplot2)
Errore: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘colorspace’
> install.packages("latticeExtra")
Installing package into ‘C:/Users/vale/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘latticeExtra’ is not available (for R version 3.4.3)
> library(latticeExtra)
Carico il pacchetto richiesto: RColorBrewer
Install the missing colorspace package by executing the following line in R:
install.packages("colorspace")

Unable to load the packages (ex: googlesheets)

I just installed the googlesheets package and later i called the library("googlesheets), but it could not executed and gave the error like :
library(googlesheets)
Error in library(googlesheets) :
there is no package called ‘googlesheets’.
Can any one help here
install.packages("googlesheets")
Installing package into ‘C:/Users/eduru.suresh/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
googlesheets 0.2.2 0.3.0 FALSE
installing the source package ‘googlesheets’
trying URL 'https://cran.rstudio.com/src/contrib/googlesheets_0.3.0.tar.gz'
Content type 'application/x-gzip' length 2187937 bytes (2.1 MB)
downloaded 2.1 MB
* installing *source* package 'googlesheets' ...
** package 'googlesheets' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'pillar'
ERROR: lazy loading failed for package 'googlesheets'
* removing 'C:/Users/eduru.suresh/Documents/R/win-library/3.3/googlesheets'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\eduru.suresh\Documents\R\win-library\3.3" C:\Users\EDURU~1.SUR\AppData\Local\Temp\RtmpEB1KKI/downloaded_packages/googlesheets_0.3.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘googlesheets’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\eduru.suresh\AppData\Local\Temp\RtmpEB1KKI\downloaded_packages’
> library(googlesheets)
Error in library(googlesheets) :
there is no package called ‘googlesheets’

R markdown won't load due to a missing package, 'backports', which also fails to download.

Here I attempt to download an earlier version of 'backports' to deal with the issue. Any ideas where to look or how to approach this issue?
> library(devtools)
Warning message:
package ‘devtools’ was built under R version 3.2.5
> install_version("backports",version="1.1.0")
Trying https://cran.rstudio.com/
Trying http://www.stats.ox.ac.uk/pub/RWin
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/backports/backports_1.1.0.tar.gz
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
> install.packages("rmarkdown")
Installing package into ‘H:/R/win-library/3.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 1.4 1.8 FALSE
installing the source package ‘rmarkdown’
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.8.tar.gz'
Content type 'application/x-gzip' length 2093181 bytes (2.0 MB)
downloaded 2.0 MB
* installing *source* package 'rmarkdown' ...
** package 'rmarkdown' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'backports'
ERROR: lazy loading failed for package 'rmarkdown'
* removing 'H:/R/win-library/3.2/rmarkdown'
* restoring previous 'H:/R/win-library/3.2/rmarkdown'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l
"H:\R\win-library\3.2" C:\Users\jacarter\AppData\Local\Temp\3\RtmpULt4Do/downloaded_packages/rmarkdown_1.8.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\jacarter\AppData\Local\Temp\3\RtmpULt4Do\downloaded_packages’

Resources