error installing package "devtools" in R - r

> install.packages("devtools")
Installing package into ‘C:/Users/hyunj/OneDrive/문서/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘withr’
There is a binary version available but
the source version is later:
binary source needs_compilation
withr 2.1.1 2.1.2 FALSE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/devtools_1.13.5.zip'
Content type 'application/zip' length 443954 bytes (433 KB)
downloaded 433 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\hyunj\AppData\Local\Temp\RtmpayZaSB\downloaded_packages
installing the source package ‘withr’
trying URL 'https://cran.rstudio.com/src/contrib/withr_2.1.2.tar.gz'
Content type 'application/x-gzip' length 53578 bytes (52 KB)
downloaded 52 KB
* installing *source* package 'withr' ...
** package 'withr' successfully unpacked and MD5 sums checked
Warning in file(file, if (append) "a" else "w") :
cannot open file 'C:/Users/hyunj/OneDrive/9.<-/R/win-library/3.4/withr/DESCRIPTION': Invalid argument
Error in file(file, if (append) "a" else "w") :
cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'withr'
* removing 'C:/Users/hyunj/OneDrive/문서/R/win-library/3.4/withr'
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\hyunj\OneDrive\문서\R\win-library\3.4" C:\Users\hyunj\AppData\Local\Temp\RtmpayZaSB/downloaded_packages/withr_2.1.2.tar.gz' had status 1
Warning in install.packages :
installation of package ‘withr’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\hyunj\AppData\Local\Temp\RtmpayZaSB\downloaded_packages’

it looks like you have localization problem. All localization problems are hard to debug. Your problem looks like to be in your path probably
C:/Users/hyunj/OneDrive/문서/R/win-library/3.4
If it would be possible to change the "문서" part for something else it might help.

Related

I can't seem to install the 'ecospat' package on R studio for windows

I am unable to install the 'ecospat' package on R and I was wondering why this could be?
After running the following bit of code using R in windows.....
install.packages('ecospat')
This is the error message I get...
Installing package into ‘C:/Users/etelford.IC.000/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘pROC’, ‘biomod2’
There are binary versions available but the source versions are later:
binary source needs_compilation
pROC 1.14.0 1.16.2 TRUE
biomod2 3.3-7.1 3.4.6 FALSE
ecospat 3.0 3.1 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/pROC_1.14.0.zip'
Content type 'application/zip' length 941305 bytes (919 KB)
downloaded 919 KB
package ‘pROC’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\etelford.IC.000\AppData\Local\Temp\RtmpsBJC01\downloaded_packages
installing the source packages ‘biomod2’, ‘ecospat’
trying URL 'https://cran.rstudio.com/src/contrib/biomod2_3.4.6.tar.gz'
Content type 'application/x-gzip' length 665227 bytes (649 KB)
downloaded 649 KB
trying URL 'https://cran.rstudio.com/src/contrib/ecospat_3.1.tar.gz'
Content type 'application/x-gzip' length 2179055 bytes (2.1 MB)
downloaded 2.1 MB
installing source package 'biomod2' ...
** package 'biomod2' 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 'pROC' 1.14.0 is being loaded, but >= 1.15.0 is required
ERROR: lazy loading failed for package 'biomod2'
removing 'C:/Users/etelford.IC.000/Documents/R/win-library/3.4/biomod2'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\etelford.IC.000\Documents\R\win-library\3.4" C:\Users\ETELFO~1.000\AppData\Local\Temp\RtmpsBJC01/downloaded_packages/biomod2_3.4.6.tar.gz' had status 1
Warning in install.packages :
installation of package ‘biomod2’ had non-zero exit status
ERROR: dependency 'biomod2' is not available for package 'ecospat'
removing 'C:/Users/etelford.IC.000/Documents/R/win-library/3.4/ecospat'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\etelford.IC.000\Documents\R\win-library\3.4" C:\Users\ETELFO~1.000\AppData\Local\Temp\RtmpsBJC01/downloaded_packages/ecospat_3.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ecospat’ had non-zero exit status
Any help would be greatly appreciated,
thanks
First of all you need to update your R version. I think you use an R 3.4 version.
The main reason why your installation fails is that you need to install pROC > 1.15 and this is not available for R 3.4.

How to install caret package. Tried install.packages("caret") but getting error

After install.packages("caret") getting below error:
Installing package into ‘...../R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rlang’, ‘recipes’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.3.4 0.4.0 TRUE
recipes 0.1.5 0.1.6 FALSE
caret 6.0-81 6.0-84 TRUE
Binaries will be installed
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/caret_6.0-81.zip'
Content type 'application/zip' length 5392174 bytes (5.1 MB)
downloaded 5.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘rlang’
package ‘caret’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
.........\Temp\RtmpkJG4l1\downloaded_packages
installing the source package ‘recipes’
trying URL 'https://cran.rstudio.com/src/contrib/recipes_0.1.6.tar.gz'
Content type 'application/x-gzip' length 968331 bytes (945 KB)
downloaded 945 KB
ERROR: dependency 'rlang' is not available for package 'recipes'
* removing 'C:/Users/PBiradarP/Documents/R/win-library/3.4/recipes'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "......\R\win-library\3.4"
...../Temp\RtmpkJG4l1/downloaded_packages/recipes_0.1.6.tar.gz' had status 1
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
I have tried and installed "rlang" package also. Its dependent on "recepies" package so again downloaded that too...
getting this message after installing this.
:Warning in install.packages :
package ‘recepies’ is not available (for R version 3.4.4)
I need to load caret package to be installed.
If you are using Windows, try this:
Add your library to libpaths; see this answer. After that try installing packages; see this answer:
install.packages("caret", dependencies=TRUE, type="win.binary")

installation of package ‘car’ had non-zero exit status in R 3.6.0

I try to install car package in Windows version of R 3.6.0. I use Windows 8.1. I got following error message: installation of package ‘car’ had non-zero exit status
Full output:
> install.packages("car")
Installing package into ‘C:/Users/Zsófia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
There is a binary version available but the source version is later:
binary source needs_compilation
car 3.0-2 3.0-3 FALSE
installing the source package ‘car’
trying URL 'https://cloud.r-project.org/src/contrib/car_3.0-3.tar.gz'
Content type 'application/x-gzip' length 539020 bytes (526 KB)
downloaded 526 KB
* installing *source* package 'car' ...
** package 'car' successfully unpacked and MD5 sums checked
** using staged installation
Warning in file(file, if (append) "a" else "w") :
cannot open file 'C:/Users/Zssfia/Documents/R/win-library/3.6/00LOCK-car/00new/car/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'car'
* removing 'C:/Users/Zsófia/Documents/R/win-library/3.6/car'
The downloaded source packages are in
‘C:\Users\Zsófia\AppData\Local\Temp\RtmpK0Qk4Q\downloaded_packages’
Warning message:
In install.packages("car") :
installation of package ‘car’ had non-zero exit status
Other packages, like psych are successfully installed.
For windows, try version 3.0.2 of the car package.
install.packages("https://cran.r-project.org/bin/windows/contrib/3.5/car_3.0-2.zip",
lib = .libPaths()[1], repos = NULL, type = "win.binary")
packageVersion("car")
package ‘car’ successfully unpacked and MD5 sums checked
> packageVersion("car")
[1] ‘3.0.2’

dependency 'quadprog' is not available for installing package 'bfast'

i am trying to install the package "bfast" in R studio running R 3.5.3 and it throws up dependency error Warning in install.packages :
dependency ‘quadprog’ is not available
i tried installing it using install.packages("bfast") and when i received the dependency error, i tried to install quadprog dependency as a package seperately like install.packages("quadprog") but then it showed me this error,Warning in install.packages :
package ‘quadprog’ is not available (for R version 3.5.3)
here is the console status while installing bfast package.
install.packages("bfast")
Installing package into ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘quadprog’ is not available
also installing the dependencies ‘tseries’, ‘forecast’
trying URL 'https://cloud.r-project.org/src/contrib/tseries_0.10-46.tar.gz'
Content type 'application/x-gzip' length 164471 bytes (160 KB)
==================================================
downloaded 160 KB
trying URL 'https://cloud.r-project.org/src/contrib/forecast_8.6.tar.gz'
Content type 'application/x-gzip' length 908972 bytes (887 KB)
==================================================
downloaded 887 KB
trying URL 'https://cloud.r-project.org/src/contrib/bfast_1.5.7.tar.gz'
Content type 'application/x-gzip' length 59697 bytes (58 KB)
==================================================
downloaded 58 KB
ERROR: dependency ‘quadprog’ is not available for package ‘tseries’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/tseries’
Warning in install.packages :
installation of package ‘tseries’ had non-zero exit status
ERROR: dependency ‘tseries’ is not available for package ‘forecast’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/forecast’
Warning in install.packages :
installation of package ‘forecast’ had non-zero exit status
ERROR: dependency ‘forecast’ is not available for package ‘bfast’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/bfast’
Warning in install.packages :
installation of package ‘bfast’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpSfjWA6/downloaded_packages’
How can i properly install the package with all it's dependencies?
I just had the same problem. I looked where R was looking from (https://cran.rstudio.com/bin/windows/contrib/3.5/) and downloaded the 'quadprog' zip file from there. Then, in R or Rstudio, you go to install packages from "package archive file". It worked for me, I hope it does for you.
There is a new version of Quadprog: 1.5-7 that can install on R above 3.1:https://cran.r-project.org/web/packages/quadprog/index.html
That solved it for me.

Issue with installing R Shiny

I'm using Version 1.1.453 of RStudio. I'm receiving an error when trying to install R Shiny using the following code (note: I've tried several different mirrors).
install.packages("shiny", repo='http://nbcgib.uesc.br/mirrors/cran/', dependencies = TRUE)
Here's the error message I'm getting. Any sense of what's going on?
Installing package into ‘C:/Users/NHK/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘httpuv’, ‘later’, ‘promises’, ‘rlang’
There are binary versions available but the source versions are later:
binary source needs_compilation
httpuv 1.3.3 1.4.4.1 TRUE
shiny 1.0.2 1.1.0 FALSE
Binaries will be installed
Packages which are only available in source form, and may need compilation of
C/C++/Fortran: ‘later’ ‘promises’ ‘rlang’
These will not be installed
trying URL
'http://nbcgib.uesc.br/mirrors/cran/bin/windows/contrib/3.2/httpuv_1.3.3.zip'
Content type 'application/zip' length 872756 bytes (852 KB)
downloaded 852 KB
package ‘httpuv’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\NHK\AppData\Local\Temp\RtmpCqqSmI\downloaded_packages
installing the source package ‘shiny’
trying URL 'http://nbcgib.uesc.br/mirrors/cran/src/contrib/shiny_1.1.0.tar.gz'
Content type 'application/x-gzip' length 2350156 bytes (2.2 MB)
downloaded 2.2 MB
ERROR: dependencies 'later', 'promises', 'rlang' are not available for package 'shiny'
* removing 'C:/Users/NHK/Documents/R/win-library/3.2/shiny'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\NHK\Documents\R\win-library\3.2"
C:\Users\N~1\AppData\Local\Temp\RtmpCqqSmI/downloaded_packages/shiny_1.1.0.
tar.gz' had status 1
Warning in install.packages :
installation of package ‘shiny’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\NHK\AppData\Local\Temp\RtmpCqqSmI\downloaded_packages’

Resources