1
votes

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

1
The text after the first bullet point will probably lead you in the right direction. ecospat requires pROC >= 1.15.0. Try install.packages("pROC") first and then packageVersion("pROC"). It might be the case that you have to install pROC from source. If you can't yet install from source, search online for help.hplieninger

1 Answers

0
votes

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.