0

I am trying to install old version of xgboost (or any other) lib from the link or local folder and every time I face this message

packageurl <- "https://cran.r-project.org/src/contrib/Archive/xgboost/xgboost_0.4-1.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

Then goes

ERROR: compilation failed for package 'xgboost'
* removing 'C:/Program Files/R/R-3.2.5/library/xgboost'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-32~1.5/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.2.5\library" "C:/Users/34F5~1/AppData/Local/Temp/RtmpCMgOWd/downloaded_packages/xgboost_0.4-1.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/34F5~1/AppData/Local/Temp/RtmpCMgOWd/downloaded_packages/xgboost_0.4-1.tar.gz’ had non-zero exit status

May it be caused by Min-GW 64 installer because I see message that DLL was not created ?

I see this point but dont have an idea how to fix it

"C:/Program Files (x86)/Git/bin/sh.exe": line 8: g++ -m32: command not found
paveltr
  • 474
  • 1
  • 8
  • 22

1 Answers1

0

In order to install source package on Windows, you need to install Rtools first which helps you compile your package. See this link to find out which version you should install corresponding to your R version.

Psidom
  • 209,562
  • 33
  • 339
  • 356