Running ‘testthat.R’ [111s/146s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # Load necessary libraries
  > library(testthat)
  > library(RMeDPower2)
  > 
  > # Set up testing environment
  > options(warn = -1)  # Suppress warnings during testing
  > 
  > test_check("RMeDPower2")
  Saving _problems/test-model-building-63.R
  Power for predictor 'condition_column', (95% confidence interval):
        100.0% (69.15, 100.0)
  
  Test: Likelihood ratio
  
  Based on 10 simulations, (0 errors, 1 warning, 9 messages)
  
  Time elapsed: 0 h 0 m 2 s
  
  nb: result might be an observed power calculation
  Saving _problems/test-utilities-155.R
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 143 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-model-building.R:61:3'): diagnoseDataModel handles non-normal distributions ──
  Error in `log(total_column)`: non-numeric argument to mathematical function
  Backtrace:
       ▆
    1. ├─base::suppressWarnings(...) at test-model-building.R:61:3
    2. │ └─base::withCallingHandlers(...)
    3. ├─base::suppressMessages(...)
    4. │ └─base::withCallingHandlers(...)
    5. └─RMeDPower2::diagnoseDataModel(...)
    6.   └─RMeDPower2:::transform_data(...)
    7.     └─RMeDPower2:::generate_qc_plots(...)
    8.       └─DHARMa::simulateResiduals(lms[[1]], plot = F)
    9.         ├─DHARMa::getSimulations(...)
   10.         └─DHARMa:::getSimulations.merMod(...)
   11.           └─DHARMa:::getSimulations.default(...)
   12.             ├─stats::simulate(object, nsim = nsim, ...)
   13.             ├─lme4:::simulate.merMod(object, nsim = nsim, ...)
   14.             │ └─base::eval(mc, parent.frame(1L))
   15.             │   └─base::eval(mc, parent.frame(1L))
   16.             └─lme4::.simulateFun(object = object, nsim = nsim, re.form = ..1)
   17.               ├─stats::predict(...)
   18.               └─lme4:::predict.merMod(...)
   19.                 └─lme4::mkNewReTrms(...)
   20.                   ├─stats::model.frame(...)
   21.                   └─stats::model.frame.default(...)
   22.                     └─base::eval(predvars, data, env)
   23.                       └─base::eval(predvars, data, env)
   24.                         └─stats::offset(log(total_column))
  ── Failure ('test-utilities.R:153:3'): diagnoseDataModel handles different model types ──
  Expected `suppressWarnings(...)` not to throw any errors.
  Actually got a <simpleError> with message:
    non-numeric argument to mathematical function
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 143 ]
  Error:
  ! Test failures.
  Execution halted