Running ‘testthat.R’ [31s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(FastRet)
  > 
  > test_check("FastRet")
  Starting 2 test processes.
  Saving _problems/test-train_frm-gbtree-11.R
  Saving _problems/test-fit_gbtree-8.R
  Saving _problems/test-fit_gbtree-16.R
  > test-plot_frm.R: [1;30m2025-12-08 13:12:52.77[0m Starting training of a lasso model
  > test-plot_frm.R: [1;30m2025-12-08 13:12:52.77[0m Mocking is enabled. Returning 'mockdata/lasso_model.rds'
  > test-plot_frm.R: [1;30m2025-12-08 13:12:52.88[0m Starting training of a lasso model
  > test-plot_frm.R: [1;30m2025-12-08 13:12:52.88[0m Mocking is enabled. Returning 'mockdata/lasso_model.rds'
  > test-plot_frm.R: [1;30m2025-12-08 13:12:52.88[0m Starting model Adjustment
  > test-plot_frm.R: [1;30m2025-12-08 13:12:52.89[0m dim(original_data): 442 x 126
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.23[0m Starting model Adjustment
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.23[0m dim(original_data): 442 x 126
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.23[0m dim(new_data): 25 x 3
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.23[0m predictors: 1, 2
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.23[0m nfolds: 5
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.23[0m Preprocessing data
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.23[0m Formula: RT_ADJ ~ RT + I(RT^2)
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.24[0m Estimating performance of adjusted model in CV
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m Fitting adjustment model on full new data set
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m Returning adjusted frm object
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m Starting model Adjustment
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m dim(original_data): 442 x 126
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m dim(new_data): 25 x 3
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m predictors: 1, 2, 3, 4, 5, 6
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m nfolds: 5
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.27[0m Preprocessing data
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.28[0m Formula: RT_ADJ ~ RT + I(RT^2) + I(RT^3) + log(RT) + exp(RT) + sqrt(RT)
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.28[0m Estimating performance of adjusted model in CV
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.31[0m Fitting adjustment model on full new data set
  > test-adjust_frm.R: [1;30m2025-12-08 13:12:53.31[0m Returning adjusted frm object
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.63[0m Starting Selective Measuring
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.63[0m Preprocessing input data
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.63[0m Mocking is enabled for 'preprocess_data'. Returning 'mockdata/RPCD_prepro.rds'.
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.63[0m Standardizing features
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.64[0m Training Ridge Regression model
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.64[0m Fitting Ridge model
  > test-plot_frm.R: [1;30m2025-12-08 13:12:52.89[0m dim(new_data): 25 x 3
  > test-plot_frm.R: [1;30m2025-12-08 13:12:53.66[0m predictors: 1, 2, 3, 4, 5, 6
  > test-plot_frm.R: [1;30m2025-12-08 13:12:53.66[0m nfolds: 5
  > test-plot_frm.R: [1;30m2025-12-08 13:12:53.66[0m Preprocessing data
  > test-plot_frm.R: [1;30m2025-12-08 13:12:53.67[0m Formula: RT_ADJ ~ RT + I(RT^2) + I(RT^3) + log(RT) + exp(RT) + sqrt(RT)
  > test-plot_frm.R: [1;30m2025-12-08 13:12:53.67[0m Estimating performance of adjusted model in CV
  > test-plot_frm.R: [1;30m2025-12-08 13:12:53.71[0m Fitting adjustment model on full new data set
  > test-plot_frm.R: [1;30m2025-12-08 13:12:53.71[0m Returning adjusted frm object
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.93[0m End training
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.93[0m Scaling features by coefficients of Ridge Regression model
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:53.94[0m Applying PAM clustering
  > test-selective_measuring.R: [1;30m2025-12-08 13:12:54.23[0m Returning clustering results
  [ FAIL 3 | WARN 5 | SKIP 0 | PASS 19 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-train_frm-gbtree.R:5:5'): train_frm works if `method == "GBTree"` ──
  <subscriptOutOfBoundsError/error/condition>
  Error in `FUN(X[[i]], ...)`: subscript out of bounds
  Backtrace:
      ▆
   1. └─FastRet::train_frm(...) at test-train_frm-gbtree.R:5:5
   2.   └─base::lapply(tmp, "[[", 2)
  ── Error ('test-fit_gbtree.R:8:5'): fit.gbtrees works as expected ──────────────
  Error in `begin_iteration:end_iteration`: argument of length 0
  Backtrace:
      ▆
   1. └─FastRet:::fit_gbtree(df, verbose = 0) at test-fit_gbtree.R:8:5
   2.   └─FastRet:::fit_gbtree_grid(...)
   3.     └─xgboost::xgb.train(...)
  ── Error ('test-fit_gbtree.R:16:5'): fit.gbtrees works for data from reverse phase column ──
  Error in `begin_iteration:end_iteration`: argument of length 0
  Backtrace:
      ▆
   1. └─FastRet:::fit_gbtree(df, verbose = 0) at test-fit_gbtree.R:16:5
   2.   └─FastRet:::fit_gbtree_grid(...)
   3.     └─xgboost::xgb.train(...)
  
  [ FAIL 3 | WARN 5 | SKIP 0 | PASS 19 ]
  Error:
  ! Test failures.
  Execution halted