Running ‘testthat.R’ [8s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ssc)
  > 
  > test_check("ssc")
  ── 1. Error: democratic works (@test_Democratic.R#9)  ──────────────────────────
  object 'knn3' not found
  1: democratic(x = wine$xtrain, y = wine$ytrain, learners = list(knn3, knn3)) at testthat/test_Democratic.R:9
  2: as.list2(learners.pars, length(learners))
  
  ── 2. Error: the learners information is complete (@test_Democratic.R#56)  ─────
  object 'knn3' not found
  1: expect_is(democratic(x = wine$xtrain, y = wine$ytrain, learners = list(knn3, knn3)), 
         class = "democratic") at testthat/test_Democratic.R:56
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: democratic(x = wine$xtrain, y = wine$ytrain, learners = list(knn3, knn3))
  5: as.list2(learners.pars, length(learners))
  
  ── 3. Error: prediction not fail when x is a vector (@test_Democratic.R#65)  ───
  object 'knn3' not found
  1: democratic(x = wine$xtrain, y = wine$ytrain, learners = list(knn3, knn3)) at testthat/test_Democratic.R:65
  2: as.list2(learners.pars, length(learners))
  
  ── 4. Error: the model structure is correct (@test_Democratic.R#76)  ───────────
  object 'knn3' not found
  1: democratic(x = wine$xtrain, y = wine$ytrain, learners = list(knn3, knn3)) at testthat/test_Democratic.R:76
  2: as.list2(learners.pars, length(learners))
  
  ── 5. Error: x can be a data.frame (@test_Democratic.R#89)  ────────────────────
  object 'knn3' not found
  1: expect_is(democratic(x = as.data.frame(wine$xtrain), y = wine$ytrain, learners = list(knn3, 
         knn3)), "democratic") at testthat/test_Democratic.R:89
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: democratic(x = as.data.frame(wine$xtrain), y = wine$ytrain, learners = list(knn3, 
         knn3))
  5: as.list2(learners.pars, length(learners))
  
  ── 6. Error: y can be a vector (@test_Democratic.R#100)  ───────────────────────
  object 'knn3' not found
  1: expect_is(democratic(x = wine$xtrain, y = as.vector(wine$ytrain), learners = list(knn3, 
         knn3)), "democratic") at testthat/test_Democratic.R:100
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: democratic(x = wine$xtrain, y = as.vector(wine$ytrain), learners = list(knn3, knn3))
  5: as.list2(learners.pars, length(learners))
  
  ── 7. Error: x.inst can be coerced to logical (@test_Democratic.R#111)  ────────
  object 'knn3' not found
  1: expect_is(democratic(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learners = list(knn3, 
         knn3)), "democratic") at testthat/test_Democratic.R:111
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: democratic(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learners = list(knn3, 
         knn3))
  5: as.list2(learners.pars, length(learners))
  
  ── 8. Error: x is a square matrix when x.inst is FALSE (@test_Democratic.R#165) 
  object 'knn3' not found
  1: expect_is(democratic(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learners = list(knn3, 
         knn3)), "democratic") at testthat/test_Democratic.R:165
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: democratic(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learners = list(knn3, 
         knn3))
  5: as.list2(learners.pars, length(learners))
  
  ── 9. Error: (unknown) (@test_DemocraticG.R#5)  ────────────────────────────────
  there is no package called 'caret'
  1: library(caret) at testthat/test_DemocraticG.R:5
  2: stop(txt, domain = NA)
  
  ── 10. Error: setred works (@test_SETRED.R#9)  ─────────────────────────────────
  object 'knn3' not found
  1: setred(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_SETRED.R:9
  2: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  3: gen.learner(labeled, ynew[labeled])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 11. Error: prediction not fail when x is a vector (@test_SETRED.R#28)  ──────
  object 'knn3' not found
  1: setred(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_SETRED.R:28
  2: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  3: gen.learner(labeled, ynew[labeled])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 12. Error: the model structure is correct (@test_SETRED.R#38)  ──────────────
  object 'knn3' not found
  1: setred(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_SETRED.R:38
  2: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  3: gen.learner(labeled, ynew[labeled])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 13. Error: x can be a data.frame (@test_SETRED.R#49)  ───────────────────────
  object 'knn3' not found
  1: expect_is(setred(x = as.data.frame(wine$xtrain), y = wine$ytrain, learner = knn3), 
         "setred") at testthat/test_SETRED.R:49
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: setred(x = as.data.frame(wine$xtrain), y = wine$ytrain, learner = knn3)
  5: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 14. Error: y can be a vector (@test_SETRED.R#59)  ───────────────────────────
  object 'knn3' not found
  1: expect_is(setred(x = wine$xtrain, y = as.vector(wine$ytrain), learner = knn3), "setred") at testthat/test_SETRED.R:59
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: setred(x = wine$xtrain, y = as.vector(wine$ytrain), learner = knn3)
  5: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 15. Error: x.inst can be coerced to logical (@test_SETRED.R#69)  ────────────
  object 'knn3' not found
  1: expect_is(setred(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learner = knn3), 
         "setred") at testthat/test_SETRED.R:69
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: setred(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learner = knn3)
  5: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 16. Error: x is a square matrix when x.inst is FALSE (@test_SETRED.R#119)  ──
  object 'knn3' not found
  1: expect_is(setred(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3), 
         "setred") at testthat/test_SETRED.R:119
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: setred(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3)
  5: setredG(y, x, gen.learner1, gen.pred1, theta, max.iter, perc.full)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, training.ints], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 17. Error: max.iter is a value greather than 0 (@test_SETRED.R#135)  ────────
  object 'knn3' not found
  1: expect_is(setred(x = wine$xtrain, y = wine$ytrain, learner = knn3, max.iter = 80), 
         "setred") at testthat/test_SETRED.R:135
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: setred(x = wine$xtrain, y = wine$ytrain, learner = knn3, max.iter = 80)
  5: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 18. Error: perc.full is a value between 0 and 1 (@test_SETRED.R#151)  ───────
  object 'knn3' not found
  1: expect_is(setred(x = wine$xtrain, y = wine$ytrain, learner = knn3, perc.full = 0.8), 
         "setred") at testthat/test_SETRED.R:151
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: setred(x = wine$xtrain, y = wine$ytrain, learner = knn3, perc.full = 0.8)
  5: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 19. Error: theta is a value between 0 and 1 (@test_SETRED.R#167)  ───────────
  object 'knn3' not found
  1: expect_is(setred(x = wine$xtrain, y = wine$ytrain, learner = knn3, theta = 0.8), 
         "setred") at testthat/test_SETRED.R:167
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: setred(x = wine$xtrain, y = wine$ytrain, learner = knn3, theta = 0.8)
  5: setredG(y, D = proxy::dist(x, method = dist, by_rows = TRUE, diag = TRUE, upper = TRUE), 
         gen.learner2, gen.pred2, theta, max.iter, perc.full)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 20. Error: selfTraining works (@test_SelfTraining.R#9)  ─────────────────────
  object 'knn3' not found
  1: selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_SelfTraining.R:9
  2: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  3: gen.learner(labeled, ynew[labeled])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 21. Error: prediction not fail when x is a vector (@test_SelfTraining.R#29)  
  object 'knn3' not found
  1: selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_SelfTraining.R:29
  2: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  3: gen.learner(labeled, ynew[labeled])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 22. Error: the model structure is correct (@test_SelfTraining.R#39)  ────────
  object 'knn3' not found
  1: selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_SelfTraining.R:39
  2: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  3: gen.learner(labeled, ynew[labeled])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 23. Error: x can be a data.frame (@test_SelfTraining.R#51)  ─────────────────
  object 'knn3' not found
  1: expect_is(selfTraining(x, y = wine$ytrain, learner = knn3), "selfTraining") at testthat/test_SelfTraining.R:51
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: selfTraining(x, y = wine$ytrain, learner = knn3)
  5: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 24. Error: y can be a vector (@test_SelfTraining.R#60)  ─────────────────────
  object 'knn3' not found
  1: expect_is(selfTraining(x = wine$xtrain, y, learner = knn3), "selfTraining") at testthat/test_SelfTraining.R:60
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: selfTraining(x = wine$xtrain, y, learner = knn3)
  5: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 25. Error: x.inst can be coerced to logical (@test_SelfTraining.R#68)  ──────
  object 'knn3' not found
  1: expect_is(selfTraining(x.inst = TRUE, x = wine$xtrain, y = wine$ytrain, learner = knn3), 
         "selfTraining") at testthat/test_SelfTraining.R:68
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: selfTraining(x.inst = TRUE, x = wine$xtrain, y = wine$ytrain, learner = knn3)
  5: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 26. Error: x is a square matrix when x.inst is FALSE (@test_SelfTraining.R#11
  object 'knn3' not found
  1: expect_is(selfTraining(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3), 
         "selfTraining") at testthat/test_SelfTraining.R:114
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: selfTraining(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3)
  5: selfTrainingG(y, gen.learner1, gen.pred1, max.iter, perc.full, thr.conf)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, training.ints], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 27. Error: max.iter is a value greather than 0 (@test_SelfTraining.R#130)  ──
  object 'knn3' not found
  1: expect_is(selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3, max.iter = 80), 
         "selfTraining") at testthat/test_SelfTraining.R:130
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3, max.iter = 80)
  5: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 28. Error: perc.full is a value between 0 and 1 (@test_SelfTraining.R#146)  ─
  object 'knn3' not found
  1: expect_is(selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3, perc.full = 0.8), 
         "selfTraining") at testthat/test_SelfTraining.R:146
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3, perc.full = 0.8)
  5: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 29. Error: thr.conf is a value between 0 and 1 (@test_SelfTraining.R#162)  ──
  object 'knn3' not found
  1: expect_is(selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3, thr.conf = 0.8), 
         "selfTraining") at testthat/test_SelfTraining.R:162
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: selfTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3, thr.conf = 0.8)
  5: selfTrainingG(y, gen.learner2, gen.pred2, max.iter, perc.full, thr.conf)
  6: gen.learner(labeled, ynew[labeled])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 30. Error: triTraining works (@test_TriTraining.R#9)  ───────────────────────
  object 'knn3' not found
  1: triTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_TriTraining.R:9
  2: triTrainingG(y, gen.learner2, gen.pred2)
  3: gen.learner(indexes, y[indexes])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 31. Error: prediction not fail when x is a vector (@test_TriTraining.R#28)  ─
  object 'knn3' not found
  1: triTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_TriTraining.R:28
  2: triTrainingG(y, gen.learner2, gen.pred2)
  3: gen.learner(indexes, y[indexes])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 32. Error: the model structure is correct (@test_TriTraining.R#38)  ─────────
  object 'knn3' not found
  1: triTraining(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_TriTraining.R:38
  2: triTrainingG(y, gen.learner2, gen.pred2)
  3: gen.learner(indexes, y[indexes])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 33. Error: x can be a data.frame (@test_TriTraining.R#50)  ──────────────────
  object 'knn3' not found
  1: expect_is(triTraining(x = as.data.frame(wine$xtrain), y = wine$ytrain, learner = knn3), 
         "triTraining") at testthat/test_TriTraining.R:50
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: triTraining(x = as.data.frame(wine$xtrain), y = wine$ytrain, learner = knn3)
  5: triTrainingG(y, gen.learner2, gen.pred2)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 34. Error: y can be a vector (@test_TriTraining.R#60)  ──────────────────────
  object 'knn3' not found
  1: expect_is(triTraining(x = wine$xtrain, y = as.vector(wine$ytrain), learner = knn3), 
         "triTraining") at testthat/test_TriTraining.R:60
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: triTraining(x = wine$xtrain, y = as.vector(wine$ytrain), learner = knn3)
  5: triTrainingG(y, gen.learner2, gen.pred2)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 35. Error: x.inst can be coerced to logical (@test_TriTraining.R#70)  ───────
  object 'knn3' not found
  1: expect_is(triTraining(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learner = knn3), 
         "triTraining") at testthat/test_TriTraining.R:70
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: triTraining(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learner = knn3)
  5: triTrainingG(y, gen.learner2, gen.pred2)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 36. Error: x is a square matrix when x.inst is FALSE (@test_TriTraining.R#120
  object 'knn3' not found
  1: expect_is(triTraining(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3), 
         "triTraining") at testthat/test_TriTraining.R:120
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: triTraining(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3)
  5: triTrainingG(y, gen.learner1, gen.pred1)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, training.ints], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 37. Error: (unknown) (@test_TriTrainingG.R#4)  ──────────────────────────────
  there is no package called 'caret'
  1: library(caret) at testthat/test_TriTrainingG.R:4
  2: stop(txt, domain = NA)
  
  ── 38. Error: coBC works (@test_coBC.R#9)  ─────────────────────────────────────
  object 'knn3' not found
  1: coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_coBC.R:9
  2: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  3: gen.learner(indexes, y[indexes])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 39. Error: prediction not fail when x is a vector (@test_coBC.R#28)  ────────
  object 'knn3' not found
  1: coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_coBC.R:28
  2: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  3: gen.learner(indexes, y[indexes])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 40. Error: the model structure is correct (@test_coBC.R#38)  ────────────────
  object 'knn3' not found
  1: coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3) at testthat/test_coBC.R:38
  2: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  3: gen.learner(indexes, y[indexes])
  4: trainModel(x[training.ints, ], cls, learner, learner.pars)
  5: do.call(learner, lpars)
  
  ── 41. Error: x can be a data.frame (@test_coBC.R#50)  ─────────────────────────
  object 'knn3' not found
  1: expect_is(coBC(x = as.data.frame(wine$xtrain), y = wine$ytrain, learner = knn3), 
         "coBC") at testthat/test_coBC.R:50
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = as.data.frame(wine$xtrain), y = wine$ytrain, learner = knn3)
  5: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 42. Error: y can be a vector (@test_coBC.R#60)  ─────────────────────────────
  object 'knn3' not found
  1: expect_is(coBC(x = wine$xtrain, y = as.vector(wine$ytrain), learner = knn3), "coBC") at testthat/test_coBC.R:60
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = wine$xtrain, y = as.vector(wine$ytrain), learner = knn3)
  5: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 43. Error: x.inst can be coerced to logical (@test_coBC.R#70)  ──────────────
  object 'knn3' not found
  1: expect_is(coBC(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learner = knn3), 
         "coBC") at testthat/test_coBC.R:70
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = wine$xtrain, y = wine$ytrain, x.inst = TRUE, learner = knn3)
  5: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 44. Error: x is a square matrix when x.inst is FALSE (@test_coBC.R#120)  ────
  object 'knn3' not found
  1: expect_is(coBC(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3), 
         "coBC") at testthat/test_coBC.R:120
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = wine$dtrain, y = wine$ytrain, x.inst = FALSE, learner = knn3)
  5: coBCG(y, gen.learner1, gen.pred1, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, training.ints], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 45. Error: max.iter is a value greather than 0 (@test_coBC.R#136)  ──────────
  object 'knn3' not found
  1: expect_is(coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, max.iter = 80), 
         "coBC") at testthat/test_coBC.R:136
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, max.iter = 80)
  5: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 46. Error: perc.full is a value between 0 and 1 (@test_coBC.R#152)  ─────────
  object 'knn3' not found
  1: expect_is(coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, perc.full = 0.8), 
         "coBC") at testthat/test_coBC.R:152
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, perc.full = 0.8)
  5: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 47. Error: N is a value greather than 0 (@test_coBC.R#169)  ─────────────────
  object 'knn3' not found
  1: expect_is(coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, N = 2), "coBC") at testthat/test_coBC.R:169
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, N = 2)
  5: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 48. Error: u is a value greather than 0 (@test_coBC.R#185)  ─────────────────
  object 'knn3' not found
  1: expect_is(coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, u = 80), "coBC") at testthat/test_coBC.R:185
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: coBC(x = wine$xtrain, y = wine$ytrain, learner = knn3, u = 80)
  5: coBCG(y, gen.learner2, gen.pred2, N, perc.full, u, max.iter)
  6: gen.learner(indexes, y[indexes])
  7: trainModel(x[training.ints, ], cls, learner, learner.pars)
  8: do.call(learner, lpars)
  
  ── 49. Error: (unknown) (@test_coBCG.R#4)  ─────────────────────────────────────
  there is no package called 'caret'
  1: library(caret) at testthat/test_coBCG.R:4
  2: stop(txt, domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 94 SKIPPED: 0 FAILED: 49
  1. Error: democratic works (@test_Democratic.R#9) 
  2. Error: the learners information is complete (@test_Democratic.R#56) 
  3. Error: prediction not fail when x is a vector (@test_Democratic.R#65) 
  4. Error: the model structure is correct (@test_Democratic.R#76) 
  5. Error: x can be a data.frame (@test_Democratic.R#89) 
  6. Error: y can be a vector (@test_Democratic.R#100) 
  7. Error: x.inst can be coerced to logical (@test_Democratic.R#111) 
  8. Error: x is a square matrix when x.inst is FALSE (@test_Democratic.R#165) 
  9. Error: (unknown) (@test_DemocraticG.R#5) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted