Error trying to install Googleway package - r

Been trying to install googleway for more than a week and it is just not working.
i have used the: install.packages("googleway", dependencies= T)'
install.packages("googleway",
repos=c("http://rstudio.org/_packages",
"http://cran.rstudio.com"))
i see it in my package list but when i try to call it with library it gives an error that another package is missing. the packages are : mime jsonlite Rcpp
tried installing these separately but still..
sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2
trying to install today was successful, library() command gave the below
library(googleway)
Error: package or namespace load failed for ‘googleway’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘shiny’
going back to the installation code:
package ‘shiny’ successfully unpacked and MD5 sums checked
tried to seperately installing 'shiny', got the below error message when installation finished:
Error: invalid version specification ‘NA’
In addition: Warning message:
In utils:::packageDescription(packageName, fields = "Version") :
no package 'knitr' was found
tried to call googleway after that:
library(googleway)
Error: package or namespace load failed for ‘googleway’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘htmltools’
i did try to install knitr still i get that a certain package is missing when i call googleway
note that i am able to download other packages and calling them successfully.

The problem was not with googleway as other packages started doing the same.
I uninstalled and reinstalled R and Rstudio then i reset R studio to desktop state using this link
https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-s-State

Related

Fixing rlang access denied

Can't seem to find a viable solution getting rlang to install after updating rstudio.
I tried using --no lock on builder tools https://work.sparktseung.com/pages/2021-09-06-R-build-package-permission/
Also tried uninstalling it and reinstalling w/ remove.packages this hasn't worked for me either after restarting.
> library(rlang)
Error in library(rlang) : there is no package called ‘rlang’
> remove.packages("rlang")
Removing package from ‘C:/Users/user/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘rlang’
Restarting R session...
> library(rlang)
Error in library(rlang) : there is no package called ‘rlang’
Here's the error when trying to install via url
Warning in file.rename(instdir, final_instdir) :
cannot rename file 'C:/Users/user/AppData/Local/R/win-library/4.2/00LOCK-rlang/00new/rlang' to 'C:/Users/user/AppData/Local/R/win-library/4.2/rlang', reason 'Access is denied'
ERROR: moving to final location failed
* removing 'C:/Users/user/AppData/Local/R/win-library/4.2/rlang'
Warning in install.packages :
installation of package ‘C:/Users/user/AppData/Local/Temp/Rtmp8sB5rS/downloaded_packages/rlang_1.0.5.tar.gz’ had non-zero exit status
Install Line
install.packages("https://cran.r-project.org/src/contrib/Archive/rlang/rlang_1.0.5.tar.gz", repo=NULL, type="source")
Session Info
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.0 tools_4.2.0
Really need to run some scripts, any help would be appreciated.

How to solve this R package tidyverse error

Good afternoon!
Under R i get this error while trying to load tidyverse
library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.4.7 is already loaded, but >= 0.4.10 is required
Session info :
sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] intervals_0.15.2
loaded via a namespace (and not attached):
[1] compiler_4.0.0 R6_2.5.0 rsconnect_0.8.16 generics_0.1.0 tools_4.0.0 glue_1.4.0
[7] tinytex_0.25 vctrs_0.3.2 xfun_0.13 rlang_0.4.7
Error while trying to update rlang (solved ):
remotes::install_github("r-lib/rlang")
Downloading GitHub repo r-lib/rlang#HEAD
Running `R CMD build`...
* checking for file 'C:\Users\Mouad\AppData\Local\Temp\RtmpgjncCL\remotes29b8390c1ebf\r-lib-rlang-98515e9/DESCRIPTION' ... OK
* preparing 'rlang':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to process help pages
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building 'rlang_0.4.10.9000.tar.gz'
Installing package into ‘C:/Users/Mouad/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'rlang' ...
ERROR: cannot remove earlier installation, is it in use?
* removing 'C:/Users/Mouad/Documents/R/win-library/4.0/rlang'
* restoring previous 'C:/Users/Mouad/Documents/R/win-library/4.0/rlang'
Error in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
(converted from warning) problem copying C:\Users\Mouad\Documents\R\win-library\4.0\00LOCK-rlang\rlang\libs\x64\rlang.dll to C:\Users\Mouad\Documents\R\win-library\4.0\rlang\libs\x64\rlang.dll: Permission denied
* removing 'C:/Users/Mouad/Documents/R/win-library/4.0/rlang'
* restoring previous 'C:/Users/Mouad/Documents/R/win-library/4.0/rlang'
Error in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
(converted from warning) problem copying C:\Users\Mouad\Documents\R\win-library\4.0\00LOCK-rlang\rlang\libs\x64\rlang.dll to C:\Users\Mouad\Documents\R\win-library\4.0\rlang\libs\x64\rlang.dll: Permission denied
Execution halted
Error: Failed to install 'rlang' from GitHub:
(converted from warning) installation of package ‘C:/Users/Mouad/AppData/Local/Temp/RtmpgjncCL/file29b84c897087/rlang_0.4.10.9000.tar.gz’ had non-zero exit status
Loading of tidyverse !
library('tidyverse')
Error: package or namespace load failed for ‘tidyverse’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'C:/Users/Mouad/Documents/R/win-library/4.0/Rcpp/libs/x64/Rcpp.dll':
LoadLibrary failure: The specified procedure could not be found.
In addition: Warning message:
package ‘tidyverse’ was built under R version 4.0.3
Thank you a lot for help!

installation of package ‘ggplot2’ had non-zero exit status

I am trying to install ggplot2, which I had previously had installed however, I keep on getting an error message saying
ggplot2 had non-zero exit status.
I have updated R, unistalled and reinstalled it.
I have also done "install.packaged("ggplot2", dependencies = TRUE), that did not work, I have tried to install each dependency independently, which did not work.
I have tried to update some of the dependencies, especially rlang, however, the version nevers changes, so again had no success...
This is the error message
>install.packages("ggplot2", dependencies = TRUE)
Installing package into ‘C:/Users/Liah Brown/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘rlang’
There are binary versions available but the source versions are
later:
binary source needs_compilation
rlang 0.2.0 0.3.1 TRUE
ggplot2 2.2.1 3.1.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/rlang_0.2.0.zip'
Content type 'application/zip' length 754726 bytes (737 KB)
downloaded 737 KB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Liah Brown\AppData\Local\Temp\Rtmpao258F\downloaded_packages
installing the source package ‘ggplot2’
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
* 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:/Users/Liah Brown/Documents/R/win-library/3.3/ggplot2'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Liah Brown\Documents\R\win-library\3.3" C:\Users\LIAHBR~1\AppData\Local\Temp\Rtmpao258F/downloaded_packages/ggplot2_3.1.0.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\Liah Brown\AppData\Local\Temp\Rtmpao258F\downloaded_packages’
My session info is...
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plyr_1.8.4
loaded via a namespace (and not attached):
[1] tools_3.3.2 yaml_2.1.18 Rcpp_0.12.16
And this is my .libPaths()
[1] "C:/Users/Liah Brown/Documents/R/win-library/3.3"
[2] "C:/Program Files/R/R-3.3.2/library"

Installing ggplot2 in R without being connected to the Internet

I tried to install the package ggplot2 on my computer with the command line:
install.packages("C:/r-packages/ggplot2",repos = NULL,type = "sourse")
Unfortunately I got the following error:
* 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]]) :
object 'vI' not found
ERROR: lazy loading failed for package 'ggplot2'
* removing 'C:/Users/rachel/Documents/R/win-library/3.3/ggplot2'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l
"C:\Users\rachel\Documents\R\win-library\3.3" "C:/r-packages/ggplot2"' had status 1
Warning in install.packages :
installation of package ‘C:/r-packages/ggplot2’ had non-zero exit status
I don't have a connection to the internet so I can't download the package directly (This is why the repos=NULL). I also installed Rtools, but I still face the same problem. The same error appears when I am trying to install the packages car or devtools
sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server >= 2012 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_0.12.6
loaded via a namespace (and not attached):
[1] tools_3.3.1
You don't need to unzip the source file that you download from CRAN (make sure it is the source, too: you want the one labelled 'Package source'). So if you're installing from source and have downloaded to your typical Downloads folder, I'd expect it to look like this:
install.packages("C:/Users/rachel/Downloads/ggplot2_2.1.0.tar.gz")
(The repos argument is inferred if you're only installing one package at a time, and type defaults to source. You misspelt source in your example, but I don't think that's a problem because of the default.)
You could also download the Windows binary, which comes as a ZIP file, and install that in a similar way:
install.packages("C:/Users/rachel/Downloads/ggplot2_2.1.0.zip", type = 'win.binary')

Package dependency error "there is no package called ‘stringi’"

I created an R package and loaded it to github (microdadosBrasil). When I try to install the package (as a user would) I get the following error:
devtools::install_github("lucasmation/microdadosBrasil")
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘stringi’
I tried solving this by adding stringi to the package dependencies
In DESCRIPTION in included:
Imports:
stringi
I also included the package import at NAMESPACE
import(stringi)
But, even then I get the same installation error.
To be hones I'm not even aware of any explicit function in my package that uses the stringi package.
If I install stringi before then the microdadosBrasil installation works:
install.packages('stringi')
devtools::install_github("lucasmation/microdadosBrasil")
This is the session information when error occurs (before pre-installing stringi)
sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.1.3
The problem is due to dependencies of packages because one package calls file in another package and so on (like recursion). So first try to install all dependencies of the package then definitely this package will work.

Resources