Running ‘testthat.R’ [95s/101s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(scoringTools)
  > 
  > test_check("scoringTools")
  Generalized Linear Model of class 'speedglm':
  
  Call:  speedglm::speedglm(formula = labels ~ ., data = df_augmente[,      -which(names(df_augmente) %in% c("poidsfinal", "classe_SCORE"))][!df_augmente$poidsfinal ==      0, ], family = stats::binomial(link = "logit"), weights = df_augmente$poidsfinal[!df_augmente$poidsfinal ==      0]) 
  
  Coefficients:
  (Intercept)          x.1          x.2  
       -0.522        2.439       -1.542  
  
  Generalized Linear Model of class 'speedglm':
  
  Call:  speedglm::speedglm(formula = stats::formula("labels ~ ."), data = Filter(function(x) (length(unique(x)) >      1), data.frame(sapply(disc[[i]]$Disc.data, as.factor), stringsAsFactors = TRUE)),      family = stats::binomial(link = "logit"), weights = NULL,      fitted = TRUE) 
  
  Coefficients:
  (Intercept)          X12          X13          X14          X22          X23  
        17.11       -20.90       -16.20       -20.39         3.54        -1.00  
  
  Generalized Linear Model of class 'speedglm':
  
  Call:  speedglm::speedglm(formula = stats::formula("labels ~ ."), data = Filter(function(x) (length(unique(x)) >      1), data.frame(sapply(disc[[i]]$Disc.data, as.factor), stringsAsFactors = TRUE)),      family = stats::binomial(link = "logit"), weights = NULL,      fitted = TRUE) 
  
  Coefficients:
  (Intercept)          X12          X13          X14          X22          X23  
        17.11       -20.90       -16.20       -20.39         3.54        -1.00  
  
  ══ Warnings ════════════════════════════════════════════════════════════════════
  ── Warning (test-augmentation.R:9:3): augmentation method works with speedglm and glm ──
  non-integer #successes in a binomial glm!
  Backtrace:
   1. scoringTools::augmentation(xf, xnf, yf) test-augmentation.R:9:2
   2. speedglm::speedglm(...)
   3. speedglm::speedglm.wfit(...)
  ── Warning (test-fuzzy-augmentation.R:9:3): fuzzy-augmentation method works with speedglm and glm ──
  non-integer #successes in a binomial glm!
  Backtrace:
   1. scoringTools::fuzzy_augmentation(xf, xnf, yf) test-fuzzy-augmentation.R:9:2
   2. speedglm::speedglm(...)
   3. speedglm::speedglm.wfit(...)
  ── Warning (test-methods.R:17:3): show method for reject works ─────────────────
  non-integer #successes in a binomial glm!
  Backtrace:
   1. scoringTools::augmentation(xf, xnf, yf) test-methods.R:17:2
   2. speedglm::speedglm(...)
   3. speedglm::speedglm.wfit(...)
  ── Warning (test-methods.R:66:3): predict method for reject inference works ────
  non-integer #successes in a binomial glm!
  Backtrace:
   1. scoringTools::augmentation(xf, xnf, yf) test-methods.R:66:2
   2. speedglm::speedglm(...)
   3. speedglm::speedglm.wfit(...)
  ── Warning (test-methods.R:73:3): predict method for reject inference works ────
  non-integer #successes in a binomial glm!
  Backtrace:
   1. scoringTools::augmentation(data.frame(xf), data.frame(xnf), yf) test-methods.R:73:2
   2. speedglm::speedglm(...)
   3. speedglm::speedglm.wfit(...)
  ── Warning (???): plot method for discretization works ─────────────────────────
  Package 'plotly' suggested but not installed, falling back to 'graphics' package.
  Backtrace:
   1. testthat::expect_error(base_plot <- plot(x = chi2_modele, type = "ROC"))
   7. scoringTools::plot(x = chi2_modele, type = "ROC")
   8. scoringTools:::.local(x, ...)
  ── Warning (???): plot method for discretization works ─────────────────────────
  Package 'plotly' suggested but not installed, falling back to 'graphics' package.
  Backtrace:
   1. testthat::expect_error(base_plot <- plot(x = chi2_modele, type = "discretization"))
   7. scoringTools::plot(x = chi2_modele, type = "discretization")
   8. scoringTools:::.local(x, ...)
  ── Warning (???): plot method for discretization works ─────────────────────────
  Package 'plotly' suggested but not installed, falling back to 'graphics' package.
  Backtrace:
   1. testthat::expect_error(base_plot <- plot(x = chi2_modele, type = "lift"))
   7. scoringTools::plot(x = chi2_modele, type = "lift")
   8. scoringTools:::.local(x, ...)
  ── Warning (???): plot method for discretization works ─────────────────────────
  Speedglm not installed, using glm instead (slower).
  Backtrace:
   1. scoringTools::chi2_iter(x, y)
  ── Warning (???): plot method for discretization works ─────────────────────────
  Package 'plotly' suggested but not installed, falling back to 'graphics' package.
  Backtrace:
   1. base::plot(x = chi2_modele, type = "glm")
   2. scoringTools::plot(x = chi2_modele, type = "glm")
   3. scoringTools:::.local(x, ...)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-topdown.R:18:9): topdown method works with speedglm ─────────────
  Error: factor X2 has new levels 3
  Backtrace:
      █
   1. └─scoringTools::topdown_iter(...) test-topdown.R:18:8
   2.   ├─scoringTools::normalizedGini(...)
   3.   │ └─scoringTools:::Gini(actual, predicted)
   4.   ├─stats::predict(best.disc[[1]], data_test, type = "response")
   5.   ├─stats::predict(best.disc[[1]], data_test, type = "response")
   6.   └─speedglm::predict.speedglm(best.disc[[1]], data_test, type = "response")
   7.     └─speedglm::predict.speedlm(...)
   8.       ├─stats::model.frame(Terms, newdata, na.action = na.action, xlev = object$xlevels)
   9.       └─stats::model.frame.default(...)
  
  [ FAIL 1 | WARN 10 | SKIP 0 | PASS 487 ]
  Error: Test failures
  Execution halted