Running ‘testthat.R’ [49s/55s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(parsnip)
  > 
  > test_check("parsnip")
  ── 1. Error: submodel prediction (@test_boost_tree_C50.R#113)  ─────────────────
  could not find function "C5.0Control"
  1: boost_tree(trees = 20, mode = "classification") %>% set_engine("C5.0", control = C5.0Control(earlyStopping = FALSE)) %>% 
         fit(churn ~ ., data = wa_churn[-(1:4), c("churn", vars)]) at testthat/test_boost_tree_C50.R:113
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: fit(., churn ~ ., data = wa_churn[-(1:4), c("churn", vars)])
  10: fit.model_spec(., churn ~ ., data = wa_churn[-(1:4), c("churn", vars)])
  11: form_xy(object = object, control = control, env = eval_env, target = object$method$fit$interface, 
         ...)
  12: xy_xy(object = object, env = env, control = control, target = target)
  13: eval_mod(fit_call, capture = control$verbosity == 0, catch = control$catch, env = env, 
         ...)
  14: eval_tidy(e, ...)
  15: parsnip::C5.0_train(x = as.data.frame(x), y = y, trials = ~20, control = ~C5.0Control(earlyStopping = FALSE))
  16: ~C5.0Control(earlyStopping = FALSE)
  
  ── 2. Error: stan prediction (@test_linear_reg_stan.R#57)  ─────────────────────
  could not find function "stan_glm"
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "could not find function \"stan_glm\"", base::quote(stan_glm(Sepal.Length ~ Sepal.Width + 
         Petal.Width + Petal.Length, data = iris, seed = 123))) at testthat/test_linear_reg_stan.R:57
  2: eval(code, test_env)
  
  ── 3. Error: stan intervals (@test_linear_reg_stan.R#105)  ─────────────────────
  could not find function "predictive_interval"
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "could not find function \"predictive_interval\"", base::quote(predictive_interval(res_xy$fit, 
         newdata = iris[1:5, ], seed = 13, prob = 0.93))) at testthat/test_linear_reg_stan.R:105
  2: eval(code, test_env)
  
  ── 4. Error: stan intervals (@test_logistic_reg_stan.R#151)  ───────────────────
  could not find function "posterior_linpred"
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "could not find function \"posterior_linpred\"", base::quote(posterior_linpred(res_form$fit, 
         newdata = lending_club[1:5, ], seed = 13, prob = 0.93, transform = TRUE))) at testthat/test_logistic_reg_stan.R:151
  2: eval(code, test_env)
  
  ── 5. Error: kknn prediction (@test_nearest_neighbor_kknn.R#95)  ───────────────
  object 'contr.dummy' of mode 'function' was not found
  1: fit(iris_basic, Sepal.Length ~ log(Sepal.Width) + Species, data = iris, control = ctrl) at testthat/test_nearest_neighbor_kknn.R:95
  2: fit.model_spec(iris_basic, Sepal.Length ~ log(Sepal.Width) + Species, data = iris, 
         control = ctrl)
  3: form_form(object = object, control = control, env = eval_env)
  4: eval_mod(fit_call, capture = control$verbosity == 0, catch = control$catch, env = env, 
         ...)
  5: eval_tidy(e, ...)
  6: kknn::train.kknn(formula = formula, data = data, ks = ~8, kernel = ~"triangular")
  7: model.matrix(mt, mf)
  8: model.matrix.default(mt, mf)
  9: contrasts(structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
     1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
     1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("setosa", "versicolor", "virginica"
     ), class = "factor", contrasts = "contr.dummy"), TRUE)
  10: get(ctr, mode = "function", envir = parent.frame())
  
  ── 6. Error: (unknown) (@test_predict_formats.R#9)  ────────────────────────────
  object 'contr.dummy' of mode 'function' was not found
  1: linear_reg(mode = "regression") %>% set_engine("lm") %>% fit(Sepal.Length ~ ., data = iris) at testthat/test_predict_formats.R:9
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: fit(., Sepal.Length ~ ., data = iris)
  10: fit.model_spec(., Sepal.Length ~ ., data = iris)
  11: form_form(object = object, control = control, env = eval_env)
  12: eval_mod(fit_call, capture = control$verbosity == 0, catch = control$catch, env = env, 
         ...)
  13: eval_tidy(e, ...)
  14: stats::lm(formula = formula, data = data)
  15: model.matrix(mt, mf, contrasts)
  16: model.matrix.default(mt, mf, contrasts)
  17: contrasts(structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
     1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
     1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("setosa", "versicolor", "virginica"
     ), class = "factor", contrasts = "contr.dummy"), TRUE)
  18: get(ctr, mode = "function", envir = parent.frame())
  
  ── 7. Failure: svm poly classification probabilities (@test_svm_poly.R#263)  ───
  as.data.frame(kern_probs) not equal to as.data.frame(parsnip_probs).
  Component ".pred_setosa": Mean relative difference: 0.002434436
  Component ".pred_versicolor": Mean relative difference: 0.003497175
  Component ".pred_virginica": Mean relative difference: 0.003543486
  
  ── 8. Failure: svm poly classification probabilities (@test_svm_poly.R#266)  ───
  as.data.frame(kern_probs) not equal to as.data.frame(parsnip_xy_probs).
  Component ".pred_setosa": Mean relative difference: 0.002434436
  Component ".pred_versicolor": Mean relative difference: 0.003497175
  Component ".pred_virginica": Mean relative difference: 0.003543486
  
  ── 9. Failure: svm rbf classification probabilities (@test_svm_rbf.R#238)  ─────
  as.data.frame(kern_probs) not equal to as.data.frame(parsnip_probs).
  Component ".pred_setosa": Mean relative difference: 0.0001386927
  Component ".pred_versicolor": Mean relative difference: 0.01294093
  Component ".pred_virginica": Mean relative difference: 0.003170498
  
  ── 10. Failure: svm rbf classification probabilities (@test_svm_rbf.R#241)  ────
  as.data.frame(kern_probs) not equal to as.data.frame(parsnip_xy_probs).
  Component ".pred_setosa": Mean relative difference: 0.0001386927
  Component ".pred_versicolor": Mean relative difference: 0.01294093
  Component ".pred_virginica": Mean relative difference: 0.003170498
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 594 SKIPPED: 20 FAILED: 10
  1.  Error: submodel prediction (@test_boost_tree_C50.R#113) 
  2.  Error: stan prediction (@test_linear_reg_stan.R#57) 
  3.  Error: stan intervals (@test_linear_reg_stan.R#105) 
  4.  Error: stan intervals (@test_logistic_reg_stan.R#151) 
  5.  Error: kknn prediction (@test_nearest_neighbor_kknn.R#95) 
  6.  Error: (unknown) (@test_predict_formats.R#9) 
  7.  Failure: svm poly classification probabilities (@test_svm_poly.R#263) 
  8.  Failure: svm poly classification probabilities (@test_svm_poly.R#266) 
  9.  Failure: svm rbf classification probabilities (@test_svm_rbf.R#238) 
  10. Failure: svm rbf classification probabilities (@test_svm_rbf.R#241) 
  
  Error: testthat unit tests failed
  Execution halted