Unable to load the packages (ex: googlesheets) - r

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’

Related

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.

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")

failed to update Rmarkdown version

I failed to load library(DataExplorer) because it says my Rmarkdown version is too old. but when I updated my Rmarkdown version, I got another error saying 'Rcpp' has non-zero exit status. I tried to remove 'Rcpp' but it says it does not exist.
> library(DataExplorer)
Error: package or namespace load failed for ‘DataExplorer’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rmarkdown’ 1.8 is already loaded, but >= 1.10 is required
> install_version('rmarkdown', version = '1.10')
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/rmarkdown/rmarkdown_1.10.tar.gz
Installing 1 packages: Rcpp
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.2.tar.gz'
Content type 'application/x-gzip' length 3699570 bytes (3.5 MB)
downloaded 3.5 MB
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
Error in system(cmd) : (converted from warning) 'make' not found
* removing 'C:/Users/qjia/Documents/R/R-3.6.1/library/Rcpp'
Error: Failed to install 'unknown package' from URL:
(converted from warning) installation of package ‘Rcpp’ had non-zero exit status
> remove.packages("Rcpp")
Removing package from ‘C:/Users/qjia/Documents/R/R-3.6.1/library’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘Rcpp’
to load DataExplorer sucessfully.

Problem installing tidyverse package "error in loadspacename"

Newly installed R and R studio on windows 10 computer and now it won't install the tidyverse package.
I have tried restarting, re-installing and the advice seen other places of using dependencies=true or installing broom before installing tidyverse and none of it worked.
Had to shorten the output because of too many links
Help would be greatly appreciated
install.packages("tidyverse")
also installing the dependencies ‘Rcpp’, ‘dplyr’, ‘purrr’, ‘rlang’, ‘broom’, ‘dbplyr’, ‘ggplot2’, ‘modelr’
There are binary versions available but the source versions are later:
binary source needs_compilation
Rcpp 0.12.16 1.0.0 TRUE
dplyr 0.7.4 0.7.8 TRUE
purrr 0.2.4 0.3.0 TRUE
rlang 0.2.0 0.3.1 TRUE
broom 0.4.4 0.5.1 FALSE
dbplyr 1.2.1 1.3.0 FALSE
ggplot2 2.2.1 3.1.0 FALSE
modelr 0.1.1 0.1.2 FALSE
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\rhas0020\AppData\Local\Temp\RtmpWkjzuk\downloaded_packages
installing the source packages ‘broom’, ‘dbplyr’, ‘ggplot2’, ‘modelr’
trying URL 'https://cran.rstudio.com/src/contrib/broom_0.5.1.tar.gz'
Content type 'application/x-gzip' length 1230196 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/src/contrib/dbplyr_1.3.0.tar.gz'
Content type 'application/x-gzip' length 269092 bytes (262 KB)
downloaded 262 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.1.0.tar.gz'
Content type 'application/x-gzip' length 2863109 bytes (2.7 MB)
downloaded 2.7 MB
trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.2.tar.gz'
Content type 'application/x-gzip' length 118432 bytes (115 KB)
downloaded 115 KB
* installing *source* package 'broom' ...
** package 'broom' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** 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 'broom'
* removing 'C:/Program Files/R/R-3.3.2/library/broom'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.2\library" C:\Users\rhas0020\AppData\Local\Temp\RtmpWkjzuk/downloaded_packages/broom_0.5.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
* installing *source* package 'dbplyr' ...
** package 'dbplyr' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'dplyr' 0.7.4 is being loaded, but >= 0.7.5 is required
ERROR: lazy loading failed for package 'dbplyr'
* removing 'C:/Program Files/R/R-3.3.2/library/dbplyr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.2\library" C:\Users\rhas0020\AppData\Local\Temp\RtmpWkjzuk/downloaded_packages/dbplyr_1.3.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘dbplyr’ had non-zero exit status
* 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(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'rlang' 0.2.0 is being loaded, but >= 0.2.1 is required
ERROR: lazy loading failed for package 'ggplot2'
* removing 'C:/Program Files/R/R-3.3.2/library/ggplot2'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.2\library" C:\Users\rhas0020\AppData\Local\Temp\RtmpWkjzuk/downloaded_packages/ggplot2_3.1.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependency 'broom' is not available for package 'modelr'
* removing 'C:/Program Files/R/R-3.3.2/library/modelr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.2\library" C:\Users\rhas0020\AppData\Local\Temp\RtmpWkjzuk/downloaded_packages/modelr_0.1.2.tar.gz' had status 1
Warning in install.packages :
installation of package ‘modelr’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\rhas0020\AppData\Local\Temp\RtmpWkjzuk\downloaded_packages’
After trying several different things including downloading and unpacking "pillar" and "broom" and others wihtout success I finally "solved" the issue by uninstalling and reinstalling RStudio again - now it works..

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