Running examples in 'xgboost-Ex.R' failed
The error most likely occurred in:

> ### Name: xgb.ggplot.deepness
> ### Title: Plot model trees deepness
> ### Aliases: xgb.ggplot.deepness xgb.plot.deepness
> 
> ### ** Examples
> 
> 
> data(agaricus.train, package='xgboost')
> 
> # Change max_depth to a higher number to get a more significant result
> bst <- xgboost(data = agaricus.train$data, label = agaricus.train$label, max_depth = 6,
+                eta = 0.1, nthread = 2, nrounds = 50, objective = "binary:logistic",
+                subsample = 0.5, min_child_weight = 2)
[04:28:33] WARNING: amalgamation/../src/learner.cc:1095: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior.
[1]	train-logloss:0.599997 
[2]	train-logloss:0.524034 
[3]	train-logloss:0.459648 
[4]	train-logloss:0.405418 
[5]	train-logloss:0.359274 
[6]	train-logloss:0.319221 
[7]	train-logloss:0.284439 
[8]	train-logloss:0.254134 
[9]	train-logloss:0.227679 
[10]	train-logloss:0.204189 
[11]	train-logloss:0.183190 
[12]	train-logloss:0.164763 
[13]	train-logloss:0.148893 
[14]	train-logloss:0.134068 
[15]	train-logloss:0.121150 
[16]	train-logloss:0.109299 
[17]	train-logloss:0.099044 
[18]	train-logloss:0.089818 
[19]	train-logloss:0.081741 
[20]	train-logloss:0.074331 
[21]	train-logloss:0.067892 
[22]	train-logloss:0.061657 
[23]	train-logloss:0.056055 
[24]	train-logloss:0.050891 
[25]	train-logloss:0.046379 
[26]	train-logloss:0.042651 
[27]	train-logloss:0.038806 
[28]	train-logloss:0.035789 
[29]	train-logloss:0.032877 
[30]	train-logloss:0.030181 
[31]	train-logloss:0.027812 
[32]	train-logloss:0.025544 
[33]	train-logloss:0.023470 
[34]	train-logloss:0.021667 
[35]	train-logloss:0.019979 
[36]	train-logloss:0.018528 
[37]	train-logloss:0.017193 
[38]	train-logloss:0.015929 
[39]	train-logloss:0.014977 
[40]	train-logloss:0.013998 
[41]	train-logloss:0.013148 
[42]	train-logloss:0.012293 
[43]	train-logloss:0.011556 
[44]	train-logloss:0.010909 
[45]	train-logloss:0.010316 
[46]	train-logloss:0.009684 
[47]	train-logloss:0.009265 
[48]	train-logloss:0.008787 
[49]	train-logloss:0.008370 
[50]	train-logloss:0.007953 
> 
> xgb.plot.deepness(bst)
> xgb.ggplot.deepness(bst)
Error: ggplot2 package is required for plotting the graph deepness.
Execution halted