Running examples in ‘superml-Ex.R’ failed
The error most likely occurred in:

> ### Name: XGBTrainer
> ### Title: Extreme Gradient Boosting Trainer
> ### Aliases: XGBTrainer
> 
> ### ** Examples
> 
> 
> ## ------------------------------------------------
> ## Method `XGBTrainer$new`
> ## ------------------------------------------------
> 
> library(data.table)
> df <- copy(iris)
> 
> # convert characters/factors to numeric
> df$Species <- as.numeric(as.factor(df$Species))-1
> 
> # initialise model
> xgb <- XGBTrainer$new(objective = 'multi:softmax',
+                       maximize = FALSE,
+                       eval_metric = 'merror',
+                       num_class=3,
+                       n_estimators = 2)
Warning in superml::check_package("xgboost") :
  Require Package xgboost for this function to work. Installing it.

Installing package into ‘/tmp/Rtmp_DaaiJ/RLIBS_4640665d2cf7’
(as ‘lib’ is unspecified)
trying URL 'http://cran.us.r-project.org/src/contrib/xgboost_1.3.1.1.tar.gz'
Content type 'application/x-gzip' length 966952 bytes (944 KB)
==================================================
downloaded 944 KB

* installing *source* package ‘xgboost’ ...
** package ‘xgboost’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking Backtrace lib... 
checking for backtrace in -lexecinfo... no
checking endian... 
configure: creating ./config.status
config.status: creating src/Makevars
** libs
make: Fatal error in reader: Makevars, line 15: Unexpected end of line seen
Current working directory /tmp/Rtmp_DaaiJ/working_dir/Rtmpq1a4r5/R.INSTALL728f1a927ca2/xgboost/src
ERROR: compilation failed for package ‘xgboost’
* removing ‘/tmp/Rtmp_DaaiJ/RLIBS_4640665d2cf7/xgboost’
Warning in utils::install.packages(pkg, repos = "http://cran.us.r-project.org") :
  installation of package ‘xgboost’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/Rtmp_DaaiJ/working_dir/Rtmp3LaaqZ/downloaded_packages’
Finished installing.
> 
> ## ------------------------------------------------
> ## Method `XGBTrainer$cross_val`
> ## ------------------------------------------------
> 
> library(data.table)
> df <- copy(iris)
> 
> # convert characters/factors to numeric
> df$Species <- as.numeric(as.factor(df$Species))-1
> 
> # initialise model
> xgb <- XGBTrainer$new(objective = 'multi:softmax',
+                       maximize = FALSE,
+                       eval_metric = 'merror',
+                       num_class=3,
+                       n_estimators = 2)
Warning in superml::check_package("xgboost") :
  Require Package xgboost for this function to work. Installing it.

Installing package into ‘/tmp/Rtmp_DaaiJ/RLIBS_4640665d2cf7’
(as ‘lib’ is unspecified)
trying URL 'http://cran.us.r-project.org/src/contrib/xgboost_1.3.1.1.tar.gz'
Content type 'application/x-gzip' length 966952 bytes (944 KB)
==================================================
downloaded 944 KB

* installing *source* package ‘xgboost’ ...
** package ‘xgboost’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking Backtrace lib... 
checking for backtrace in -lexecinfo... no
checking endian... 
configure: creating ./config.status
config.status: creating src/Makevars
** libs
make: Fatal error in reader: Makevars, line 15: Unexpected end of line seen
Current working directory /tmp/Rtmp_DaaiJ/working_dir/RtmpUNa4Oe/R.INSTALL9477a6a3b01/xgboost/src
ERROR: compilation failed for package ‘xgboost’
* removing ‘/tmp/Rtmp_DaaiJ/RLIBS_4640665d2cf7/xgboost’
Warning in utils::install.packages(pkg, repos = "http://cran.us.r-project.org") :
  installation of package ‘xgboost’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/Rtmp_DaaiJ/working_dir/Rtmp3LaaqZ/downloaded_packages’
Finished installing.
> 
> # do cross validation to find optimal value for n_estimators
> xgb$cross_val(X = df, y = 'Species',nfolds = 3, stratified = TRUE)
converting the data into xgboost format..
Error in loadNamespace(name) : there is no package called ‘xgboost’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted