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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: booster2sql
> ### Title: Transform XGBoost model object to SQL query.
> ### Aliases: booster2sql
> 
> ### ** Examples
> 
> library(xgboost)
> # load data
> df = data.frame(ggplot2::diamonds)
> head(df)
  carat       cut color clarity depth table price    x    y    z
1  0.23     Ideal     E     SI2  61.5    55   326 3.95 3.98 2.43
2  0.21   Premium     E     SI1  59.8    61   326 3.89 3.84 2.31
3  0.23      Good     E     VS1  56.9    65   327 4.05 4.07 2.31
4  0.29   Premium     I     VS2  62.4    58   334 4.20 4.23 2.63
5  0.31      Good     J     SI2  63.3    58   335 4.34 4.35 2.75
6  0.24 Very Good     J    VVS2  62.8    57   336 3.94 3.96 2.48
> 
> # data processing
> out <- onehot2sql(df)
> x <- out$model.matrix[,colnames(out$model.matrix)!='price']
> y <- out$model.matrix[,colnames(out$model.matrix)=='price']
> 
> # model training
> bst <- xgboost(data = x,
+                label = y,
+                max.depth = 3,
+                eta = .3,
+                nround = 5,
+                nthread = 1,
+                objective = 'reg:linear')
Warning in throw_err_or_depr_msg("Passed unrecognized parameters: ", paste(head(names_unrecognized),  :
  Passed unrecognized parameters: max.depth. This warning will become an error in a future version.
Warning in throw_err_or_depr_msg("Parameter '", match_old, "' has been renamed to '",  :
  Parameter 'data' has been renamed to 'x'. This warning will become an error in a future version.
Warning in throw_err_or_depr_msg("Parameter '", match_old, "' has been renamed to '",  :
  Parameter 'label' has been renamed to 'y'. This warning will become an error in a future version.
Warning in throw_err_or_depr_msg("Parameter '", match_old, "' has been renamed to '",  :
  Parameter 'eta' has been renamed to 'learning_rate'. This warning will become an error in a future version.
Error in process.y.margin.and.objective(y, base_margin, objective, params) : 
  Got numeric 'y' - supported objectives for this data are: reg:squarederror, reg:squaredlogerror, reg:logistic, reg:pseudohubererror, reg:absoluteerror, reg:quantileerror, count:poisson, reg:gamma, reg:tweedie. Was passed: reg:linear
Calls: xgboost -> process.y.margin.and.objective
Execution halted