I am having trouble loading "adabag" package



# Code


S1_tr_S.boosting <- boosting(Speeds ~ ., data = S1_tr_S, boos = TRUE, mfinal = 100)

Error in boosting(Speeds ~ ., data = S1_tr_S, boos = TRUE, mfinal = 100) : could not find function "boosting"

# Issue

So I am trying to run a boosting classification model on a set of data with Speeds as the response variable and S1_tr_S as the data. I have loaded the package adabag which contains the boosting function but I go to run the code and it says boosting function not found.

# System Info

sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: OS X El Capitan 10.11.6

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ggplot2_2.2.1 lattice_0.20-35 rpart_4.1-11 randomForest_4.6-14

loaded via a namespace (and not attached): [1] Rcpp_0.12.18 compiler_3.4.1 plyr_1.8.4 bindr_0.1.1 class_7.3-14
[6] iterators_1.0.10 tools_3.4.1 tibble_1.3.4 nlme_3.1-131 gtable_0.2.0
[11] pkgconfig_2.0.1 rlang_0.2.2 Matrix_1.2-10 foreach_1.4.4 RcppRoll_0.3.0
[16] bindrcpp_0.2.2 stringr_1.2.0 dplyr_0.7.6 grid_3.4.1 tidyselect_0.2.3
[21] glue_1.1.1 data.table_1.11.4 R6_2.2.2 reshape2_1.4.2 purrr_0.2.4
[26] tidyr_0.7.2 magrittr_1.5 MASS_7.3-47 scales_0.5.0 backports_1.1.2
[31] codetools_0.2-15 ModelMetrics_1.2.0 assertthat_0.2.0 timeDate_3043.102 colorspace_1.3-2
[36] stringi_1.1.5 lazyeval_0.2.0 munsell_0.4.3 broom_0.5.0


[1] ".GlobalEnv" "package:ggplot2" "package:lattice" "package:rpart"
[5] "package:randomForest" "tools:rstudio" "package:stats" "package:graphics"
[9] "package:grDevices" "package:utils" "package:datasets" "package:methods"
[13] "Autoloads" "package:base"

# Uninstalling the adabag package and loading it again

library("adabag", lib.loc="/Library/Frameworks/R.framework/Versions/3.4/Resources/library") Loading required package: caret

Error: package or namespace load failed for ‘caret’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘robustbase’

Error: package ‘caret’ could not be loaded

In addition: Warning messages:

1: package ‘adabag’ was built under R version 3.4.3

2: package ‘caret’ was built under R version 3.4.4

Still get same sessioninfo message of adabag package missing after I uninstalled and loaded again


This part is telling you that:

  1. adabag depends on caret
  2. caret depends on robustbase
  3. robustbase is missing
  4. So caret can’t load, and therefore adabag can’t load

So the first place I’d start would be trying install.packages("robustbase"), then (assuming that is successful), restart R and try loading adabag again.


Thank you that worked