I currently have xgboost package installed from cran, the latest version on there is 0.9.
On Github, the latest version is 1.1.
Tried:
devtools::install_github("dmlc/xgboost")
Downloading GitHub repo dmlc/xgboost@master
Error: Failed to install 'xgboost' from GitHub:
Does not appear to be an R package (no DESCRIPTION)
I then found this discussion with someone else struggling to install xgboost. On that page is a reference to the zip file at https://github.com/dmlc/xgboost/archive/master.zip
So, I tried downloading the zip file and then manually uploading to my home directory (hosted rstudio in the browser). However, rstudio auto unzips on upload of a zip file so I was unable to devtools::install_local()
:
devtools::install_local("~/xgboost-master/")
Error: Failed to install 'unknown package' from local:
cannot open the connection
In addition: Warning messages:
1: In read.dcf(path) :
cannot open compressed file '/home/rstudio-doug/xgboost-master/DESCRIPTION', probable reason 'No such file or directory'
2: In read.dcf(path) :
cannot open compressed file '/home/rstudio-doug/xgboost-master/DESCRIPTION', probable reason 'No such file or directory'
There is a directory there called xgboost-master.
I then tried to install from the url with the zipfile:
devtools::install_url("https://github.com/dmlc/xgboost/archive/master.zip")
Downloading package from url: https://github.com/dmlc/xgboost/archive/master.zip
Error: Failed to install 'unknown package' from URL:
Does not appear to be an R package (no DESCRIPTION)
Similar message.
I also tried pacman:
pacman::p_install_gh("dmlc/xgboost")
Downloading GitHub repo dmlc/xgboost@master
Installation failed: NULL : Failed to install 'xgboost' from GitHub:
Does not appear to be an R package (no DESCRIPTION)
The following packages were not able to be installed:
xgboost
Warning message:
In pacman::p_install_gh("dmlc/xgboost") :
The following may have incorrect capitalization specification:
xgboost
How can I install xgboost 1.1?
sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Amazon Linux 2
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] curl_4.3 httr_1.4.1 devtools_2.3.0.9000 usethis_1.6.1
loaded via a namespace (and not attached):
[1] Metrics_0.1.4 xfun_0.15 remotes_2.1.1 noctua_1.6.0.9000
[5] lattice_0.20-38 vctrs_0.3.1 testthat_2.3.2 htmltools_0.5.0
[9] yaml_2.2.1 utf8_1.1.4 rlang_0.4.6 pkgbuild_1.0.8.9000
[13] pillar_1.4.4 glue_1.4.1 withr_2.2.0 DBI_1.1.0
[17] sessioninfo_1.1.1 paws_0.1.7 evaluate_0.14 memoise_1.1.0
[21] knitr_1.29 callr_3.4.3 ps_1.3.3 fansi_0.4.1
[25] Rcpp_1.0.4.6 readr_1.3.1 BiocManager_1.30.10 backports_1.1.8
[29] desc_1.2.0 pkgload_1.1.0 fs_1.4.2 MLmetrics_1.1.1
[33] hms_0.5.3 packrat_0.5.0 digest_0.6.25 stringi_1.4.6
[37] processx_3.4.3 grid_3.6.0 rprojroot_1.3-2 cli_2.0.2
[41] tools_3.6.0 magrittr_1.5 tibble_3.0.1 pacman_0.5.1
[45] crayon_1.3.4 pkgconfig_2.0.3 zeallot_0.1.0 ellipsis_0.3.1
[49] Matrix_1.2-18 data.table_1.12.8 prettyunits_1.1.1 assertthat_0.2.1
[53] rmarkdown_2.1 rstudioapi_0.11 R6_2.4.1 compiler_3.6.0
The github repo for xgboost keeps the R package code in a sub-directory, not the main directory like most R packages do. You'll see the DESCRIPTION
is in there. Try
devtools::install_github("dmlc/xgboost", subdir="R-package")