1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Author: Dylan Aïssi
Description: Skip test if there is no "pROC" package.
Last-Update: 2019-07-24
--- a/tests/testthat/test_twoClassSummary.R
+++ b/tests/testthat/test_twoClassSummary.R
@@ -12,6 +12,7 @@
te_prob <- as.data.frame(te_prob, stringsAsFactors = TRUE)
cm <- caret::confusionMatrix(te_pred, te_dat$Class)
+ skip_if_not_installed("pROC")
library(pROC)
roc_crv <- pROC::roc(te_dat$Class, te_prob$Class1, direction = ">", quiet = TRUE)
roc_auc <- as.numeric(pROC::auc(roc_crv))
|