Issue installing library(plyr) in R (Windows) - plyr

I have R version 3.2.2 and am working on Windows 10. I am trying to install library(plyr), but could not install 'Rcpp' dependency (see warning in bold fonts). Install message and warnings below. Any suggestions?
Thanks!
utils:::menuInstallPkgs()
also installing the dependency ‘Rcpp’
trying URL >'https://mirrors.nics.utk.edu/cran/bin/windows/contrib/3.2/Rcpp_0.12.1.zip'
Content type 'application/zip' length 3189850 bytes (3.0 MB)
downloaded 3.0 MB
trying URL
'https://mirrors.nics.utk.edu/cran/bin/windows/contrib/3.2/plyr_1.8.3.zip'
Content type 'application/zip' length 1114768 bytes (1.1 MB)
downloaded 1.1 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning: unable to move temporary installation > >‘C:\Users\xxx\Documents\R\win-library\3.2\file2e0437cc54d8\Rcpp’ to
‘C:\Users\xxx\Documents\R\win-library\3.2\Rcpp’
package ‘plyr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mydejesus\AppData\Local\Temp\Rtmp0yK2yD\downloaded_packages
library(plyr)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]) :
there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘plyr’

Looks like it's a permissions setting in Windows. I changed the permission on the folder to share with everyone and it installed successfully.

Related

Unable to load libraries

I recently updated R and Rstudio and since then have not been able to load any libraries, including ggplot2, tidyverse.
Just for clarity, let me share the messages I get when I install tidyverse and try to load the library:
install.packages("tidyverse")
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/Computer User 1/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/tidyverse_1.3.2.zip'
Content type 'application/zip' length 428970 bytes (418 KB)
downloaded 418 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages**
**> 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:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
**
Also, to be clear, I did install the latest version of Rtools.
Now I tried reading through several messages on google regarding the same error but failed to understand the solution. The main thing I do not understand is why the packages are installed here: C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages, and then are loaded from here: C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll.
I have tried specifying the library path but have not been successful at solving the problem. I don't know why R is unable to load the libraries. Also, on running .libpaths(), I get two libraries:
[1] "C:/Users/Computer User 1/AppData/Local/R/win-library/4.2"
[2] "C:/Program Files/R/R-4.2.2/library"
And when I try to install tidyverse here: C:/Program Files/R/R-4.2.2/library, I get this error: the folder is unwritable.
I don't know how to solve this issue. Please help.

Rscript execution error when installing RcppParallel on cluster

I tried to install the package RcppParallel on a cluster but encountered the error below.
Content type 'application/x-gzip' length 1967672 bytes (1.9 MB)
==================================================
downloaded 1.9 MB
* installing *source* package ‘RcppParallel’ ...
** package ‘RcppParallel’ successfully unpacked and MD5 sums checked
Rscript execution error: No such file or directory
ERROR: configuration failed for package ‘RcppParallel’
* removing ‘/moto/home/yz4247/rpackages/RcppParallel’
The downloaded source packages are in
‘/tmp/RtmpvW3tlA/downloaded_packages’
Warning message:
In install.packages("RcppParallel") :
installation of package ‘RcppParallel’ had non-zero exit status
Because it is on a cluster, I installed the package in my personal library. The GCC version is 11.2.0.
How should I get rid of the error? Thanks!

How to fix "'blob' package not found" when installing RSQLite?

I want to use the RSQLite package, but when I try to use the library, I get this error:
Error: package or namespace load failed for ‘RSQLite’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘blob’
Is there a way to fix this?
I've tried updating the RSQLite Library which did not change anything, and
I tried installing the blob package, but it did not work.
It said "Warning in install.packages
installation of package ‘blob’ had non-zero exit status"
I tried to install the RSQLite package using:
install.packages("RSQLite")
and this was the output:
Installing package into C:/Users/malik/OneDrive/Documents/R/win-library/3.4
(as lib is unspecified)
also installing the dependencies ellipsis, rlang, vctrs, blob
There are binary versions available but the source versions are later:
binary source needs_compilation
ellipsis 0.1.0 0.2.0.1 TRUE
rlang 0.3.4 0.4.0 TRUE
vctrs 0.1.0 0.2.0 TRUE
blob 1.1.1 1.2.0 FALSE
RSQLite 2.1.1 2.1.2 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ellipsis_0.1.0.zip'
Content type 'application/zip' length 30847 bytes (30 KB)
downloaded 30 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/vctrs_0.1.0.zip'
Content type 'application/zip' length 499748 bytes (488 KB)
downloaded 488 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/RSQLite_2.1.1.zip'
Content type 'application/zip' length 2097863 bytes (2.0 MB)
downloaded 2.0 MB
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘RSQLite’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\malik\AppData\Local\Temp\RtmpOsEBnR\downloaded_packages
installing the source package �blob�
trying URL 'https://cran.rstudio.com/src/contrib/blob_1.2.0.tar.gz'
Content type 'application/x-gzip' length 9355 bytes
downloaded 9355 bytes
* installing *source* package 'blob' ...
** package 'blob' successfully unpacked and MD5 sums checked
** R
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'vctrs' 0.1.0 is being loaded, but >= 0.2.0 is required
ERROR: lazy loading failed for package 'blob'
* removing 'C:/Users/malik/OneDrive/Documents/R/win-library/3.4/blob'
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\malik\OneDrive\Documents\R\win-library\3.4" C:\Users\malik\AppData\Local\Temp\RtmpOsEBnR/downloaded_packages/blob_1.2.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘blob’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\malik\AppData\Local\Temp\RtmpOsEBnR\downloaded_packages’
When I try to use the RSQLite Library, I get this error:
I wanted to use the library, but it won't let me.
Try this..
library(remotes)
install_github("cran/blob")
install_github("cran/RSQLite")
It worked for me.........

I am trying to install devtools on Rstudio

I am trying to install devtools on Rstudio, and I am receiving this error message:
install.packages("devtools")
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/devtools_1.7.0.zip'
Content type 'application/zip' length 308736 bytes (301 Kb)
opened URL
downloaded 301 Kb
package ‘devtools’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘devtools’
The downloaded binary packages are in
C:\Users\David\AppData\Local\temp\Rtmpu4TtC7\downloaded_packages
What is the best way to resolve. Thanks.

Error when installing XLConnect in RStudio

Thanks in advance.
I am trying to install XLConnect package. I am using RStudio. For your information rJava is installed.
Here is my command in R and the error message:
install.packages("XLConnect")
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/XLConnect_0.2-7.zip'
Content type 'application/zip' length 17997942 bytes (17.2 Mb)
opened URL
downloaded 16.7 Mb
Warning in install.packages : downloaded length 17473536 != reported length 17997942
Warning in install.packages : error 1 in extracting from zip file
Warning in install.packages : cannot open compressed file 'XLConnect/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
The warnings indicate that something is corrupting the package download. Quite often the reason is a corporate firewall. You might want to check with your IT whether this is the case.
Try installing using standard R and the standard R will tell you where is package zip file is saved. Then you can install using RStudio by installing package from local zip file.
I faced similar issue while downloading some package. Try re-installing the package cran using
install.packages("CRAN")
See if it works, if the issue of unmatched length persists uninstall RStudio and install it again.
That seemed to have worked for me.

Resources