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)
[1]	train-error:0.001996 
[2]	train-error:0.001228 
[3]	train-error:0.001228 
[4]	train-error:0.001228 
[5]	train-error:0.001228 
[6]	train-error:0.001228 
[7]	train-error:0.001228 
[8]	train-error:0.001228 
[9]	train-error:0.001228 
[10]	train-error:0.001228 
[11]	train-error:0.001228 
[12]	train-error:0.001228 
[13]	train-error:0.001228 
[14]	train-error:0.001228 
[15]	train-error:0.001228 
[16]	train-error:0.001228 
[17]	train-error:0.001228 
[18]	train-error:0.001228 
[19]	train-error:0.001228 
[20]	train-error:0.001228 
[21]	train-error:0.001228 
[22]	train-error:0.001228 
[23]	train-error:0.001228 
[24]	train-error:0.000000 
[25]	train-error:0.000000 
[26]	train-error:0.000000 
[27]	train-error:0.000000 
[28]	train-error:0.000000 
[29]	train-error:0.000000 
[30]	train-error:0.000000 
[31]	train-error:0.000000 
[32]	train-error:0.000000 
[33]	train-error:0.000000 
[34]	train-error:0.000000 
[35]	train-error:0.000000 
[36]	train-error:0.000000 
[37]	train-error:0.000000 
[38]	train-error:0.000000 
[39]	train-error:0.000000 
[40]	train-error:0.000000 
[41]	train-error:0.000000 
[42]	train-error:0.000000 
[43]	train-error:0.000000 
[44]	train-error:0.000000 
[45]	train-error:0.000000 
[46]	train-error:0.000000 
[47]	train-error:0.000000 
[48]	train-error:0.000000 
[49]	train-error:0.000000 
[50]	train-error:0.000000 
> 
> xgb.plot.deepness(bst)
> xgb.ggplot.deepness(bst)
Error: ggplot2 package is required for plotting the graph deepness.
Execution halted