Running 'testthat.R' [58s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(mikropml)
  > 
  > test_check("mikropml")
  -- FAILURE (test-corr_feats.R:29:3): get_corr_feats works ----------------------
  get_corr_feats(...) not equivalent to structure(...).
  Component "feature1": 'current' is not a factor
  Component "feature2": 'current' is not a factor
  
  -- FAILURE (test-corr_feats.R:40:3): get_corr_feats works ----------------------
  get_corr_feats(...) not equivalent to structure(...).
  Component "feature1": 'current' is not a factor
  Component "feature2": 'current' is not a factor
  
  -- Skip (test-feature_importance.R:14:3): find_permuted_perf_metric works ------
  Reason: On CRAN
  
  -- Skip (test-feature_importance.R:98:3): feature importances are correct when t
  Reason: On CRAN
  
  -- ERROR (test-preprocess_data.R:18:3): preprocess_data works ------------------
  Error: Can't subset columns that don't exist.
  x Columns `3`, `8`, `5`, `6`, `11`, etc. don't exist.
  Backtrace:
       x
    1. +-testthat::expect_equal(...) test-preprocess_data.R:18:2
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-testthat::expect_message(...)
    5. | \-testthat:::quasi_capture(enquo(object), label, capture_messages)
    6. |   +-testthat:::.capture(...)
    7. |   | \-base::withCallingHandlers(...)
    8. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. +-mikropml::preprocess_data(test_df, "outcome")
   10. | \-mikropml:::collapse_correlated_features(processed_feats, group_neg_corr)
   11. |   \-features %>% dplyr::select(dplyr::all_of(corr_cols))
   12. +-dplyr::select(., dplyr::all_of(corr_cols))
   13. \-dplyr:::select.data.frame(., dplyr::all_of(corr_cols))
   14.   \-tidyselect::eval_select(expr(c(...)), .data)
   15.     \-tidyselect:::eval_select_impl(...)
   16.       +-tidyselect:::with_subscript_errors(...)
   17.       | +-base::tryCatch(...)
   18.       | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   19.       | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20.       | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   21.       | \-tidyselect:::instrument_base_errors(expr)
   22.       |   \-base::withCallingHandlers(...)
   23.       \-tidyselect:::vars_select_eval(...)
   24.         \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   25.           \-tidyselect:::eval_c(expr, data_mask, context_mask)
   26.             \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   27.               \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   28.                 \-tidyselect:::as_indices_sel_impl(...)
   29.                   \-tidyselect:::as_indices_impl(x, vars, strict = strict)
   30.                     \-tidyselect:::chr_as_locations(x, vars)
   31.                       \-vctrs::vec_as_location(x, n = length(vars), names = vars)
   32.                         \-(function () ...
   33.                           \-vctrs:::stop_subscript_oob(...)
   34.                             \-vctrs:::stop_subscript(...)
  
  -- FAILURE (test-preprocess_data.R:241:3): rm_missing_outcome works ------------
  expect_message(...) not equal to structure(...).
  Component "outcome": 'current' is not a factor
  Component "var2": 'current' is not a factor
  Component "var3": 'current' is not a factor
  Component "var6": 'current' is not a factor
  
  -- FAILURE (test-preprocess_data.R:257:3): rm_missing_outcome works ------------
  rm_missing_outcome(test_df[1:3, 1:8], "outcome") not equal to structure(...).
  Component "outcome": 'current' is not a factor
  Component "var2": 'current' is not a factor
  Component "var3": 'current' is not a factor
  Component "var6": 'current' is not a factor
  
  -- FAILURE (test-preprocess_data.R:280:3): change_to_num works -----------------
  change_to_num(dplyr::as_tibble(test_df)) not equal to structure(...).
  Component "outcome": 'current' is not a factor
  Component "var2": 'current' is not a factor
  Component "var3": 'current' is not a factor
  Component "var6": 'current' is not a factor
  Component "var9": 'current' is not a factor
  
  -- FAILURE (test-preprocess_data.R:302:3): process_novar_feats works -----------
  expect_message(process_novar_feats(test_df[1:3, 2:ncol(test_df)])) not equal to list(...).
  Component "var_feats": Component "var2": 'current' is not a factor
  Component "var_feats": Component "var3": 'current' is not a factor
  Component "var_feats": Component "var9": 'current' is not a factor
  Component "var_feats": Component "var12": 'current' is not a factor
  
  -- FAILURE (test-preprocess_data.R:324:3): process_novar_feats works -----------
  process_novar_feats(test_df[1:3, 2:5]) not equal to list(...).
  Component "var_feats": Component "var2": 'current' is not a factor
  Component "var_feats": Component "var3": 'current' is not a factor
  
  -- FAILURE (test-preprocess_data.R:402:3): get_caret_processed_df works --------
  get_caret_processed_df(test_df[1:3, 2:3], c("center", "scale")) not equal to list(...).
  Component "processed": Component "var2": 'current' is not a factor
  
  -- FAILURE (test-preprocess_data.R:409:3): get_caret_processed_df works --------
  get_caret_processed_df(...) not equal to list(...).
  Component "processed": Component "var2": 'current' is not a factor
  Component "processed": Component "var9": 'current' is not a factor
  
  -- FAILURE (test-preprocess_data.R:423:3): get_caret_dummyvars_df works --------
  get_caret_dummyvars_df(test_df[1:3, 2:3], FALSE) not equal to dplyr::tibble(...).
  Names: 3 string mismatches
  Length mismatch: comparison on first 4 components
  
  -- FAILURE (test-preprocess_data.R:432:3): get_caret_dummyvars_df works --------
  get_caret_dummyvars_df(test_df[1:3, 2:3], TRUE) not equal to dplyr::tibble(...).
  Names: 2 string mismatches
  Length mismatch: comparison on first 3 components
  
  -- FAILURE (test-preprocess_data.R:440:3): get_caret_dummyvars_df works --------
  get_caret_dummyvars_df(test_df[1:4, c(2:3, 10)], FALSE) not equal to structure(...).
  Names: 7 string mismatches
  
  -- ERROR (test-preprocess_data.R:468:3): collapse_correlated_features works ----
  Error: Can't subset columns that don't exist.
  x Column `3` doesn't exist.
  Backtrace:
       x
    1. +-testthat::expect_equal(...) test-preprocess_data.R:468:2
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-mikropml:::collapse_correlated_features(...)
    5. | \-features %>% dplyr::select(dplyr::all_of(corr_cols))
    6. +-dplyr::select(., dplyr::all_of(corr_cols))
    7. \-dplyr:::select.data.frame(., dplyr::all_of(corr_cols))
    8.   \-tidyselect::eval_select(expr(c(...)), .data)
    9.     \-tidyselect:::eval_select_impl(...)
   10.       +-tidyselect:::with_subscript_errors(...)
   11.       | +-base::tryCatch(...)
   12.       | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   13.       | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   14.       | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   15.       | \-tidyselect:::instrument_base_errors(expr)
   16.       |   \-base::withCallingHandlers(...)
   17.       \-tidyselect:::vars_select_eval(...)
   18.         \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   19.           \-tidyselect:::eval_c(expr, data_mask, context_mask)
   20.             \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   21.               \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   22.                 \-tidyselect:::as_indices_sel_impl(...)
   23.                   \-tidyselect:::as_indices_impl(x, vars, strict = strict)
   24.                     \-tidyselect:::chr_as_locations(x, vars)
   25.                       \-vctrs::vec_as_location(x, n = length(vars), names = vars)
   26.                         \-(function () ...
   27.                           \-vctrs:::stop_subscript_oob(...)
   28.                             \-vctrs:::stop_subscript(...)
  
  -- Skip (test-run_ml.R:60:3): run_ml works for linear regression ---------------
  Reason: On CRAN
  
  -- Skip (test-run_ml.R:74:3): run_ml works for random forest with grouping & fea
  Reason: On CRAN
  
  -- Skip (test-run_ml.R:90:3): run_ml works for svmRadial -----------------------
  Reason: On CRAN
  
  -- Skip (test-run_ml.R:104:3): run_ml works for xgbTree ------------------------
  Reason: On windows
  
  -- Skip (test-run_ml.R:120:3): run_ml works for rpart2 -------------------------
  Reason: On CRAN
  
  -- ERROR (test-train_model.R:44:3): train_model works --------------------------
  Error: The tuning parameter grid should have columns mtry
  Backtrace:
      x
   1. +-testthat::expect_equal(...) test-train_model.R:44:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-mikropml::train_model(...)
   5.   +-base::withCallingHandlers(...)
   6.   +-caret::train(...)
   7.   \-caret:::train.formula(...)
   8.     +-caret::train(x, y, weights = w, ...)
   9.     \-caret:::train.default(x, y, weights = w, ...)
  
  -- Skipped tests  --------------------------------------------------------------
  * On CRAN (6)
  * On windows (1)
  
  == testthat results  ===========================================================
  FAILURE (test-corr_feats.R:29:3): get_corr_feats works
  FAILURE (test-corr_feats.R:40:3): get_corr_feats works
  ERROR (test-preprocess_data.R:18:3): preprocess_data works
  FAILURE (test-preprocess_data.R:241:3): rm_missing_outcome works
  FAILURE (test-preprocess_data.R:257:3): rm_missing_outcome works
  FAILURE (test-preprocess_data.R:280:3): change_to_num works
  FAILURE (test-preprocess_data.R:302:3): process_novar_feats works
  FAILURE (test-preprocess_data.R:324:3): process_novar_feats works
  FAILURE (test-preprocess_data.R:402:3): get_caret_processed_df works
  FAILURE (test-preprocess_data.R:409:3): get_caret_processed_df works
  FAILURE (test-preprocess_data.R:423:3): get_caret_dummyvars_df works
  FAILURE (test-preprocess_data.R:432:3): get_caret_dummyvars_df works
  FAILURE (test-preprocess_data.R:440:3): get_caret_dummyvars_df works
  ERROR (test-preprocess_data.R:468:3): collapse_correlated_features works
  ERROR (test-train_model.R:44:3): train_model works
  
  [ FAIL 15 | WARN 0 | SKIP 7 | PASS 155 ]
  Error: Test failures
  Execution halted