Running ‘testthat.R’ [31m/31m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(rxode2)
  rxode2 5.1.2 using 3 threads (see ?getRxThreads)
    no cache: create with `rxCreateCache()`
  > library(posologyr)
  > library(testthat)
  > setRxThreads(2L) #for CRAN, following the advice of mattfidler
  > 
  > test_check("posologyr")
  Error building the model: see rxode2::rxLastCompile()
  please make sure you have a working C compiler set up
  you may use nlmixr2::nlmixr2CheckInstall() to help diagnose installation issues
  Saving _problems/test_doseoptim_cmt-60.R
  [ FAIL 1 | WARN 1 | SKIP 4 | PASS 72 ]
  
  ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test_rxui.R:48:3', 'test_rxui.R:128:3'
  • empty test (2): ,
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_doseoptim_cmt.R:57:3'): Optimal dose can be estimated for dosing in any compartment ──
  Error: error building model
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test_doseoptim_cmt.R:57:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─posologyr::poso_dose_conc(...)
    5.   └─posologyr:::get_prior_model(prior_model)
    6.     ├─rxui$posologyr
    7.     └─rxode2:::`$.rxUi`(rxui, "posologyr")
    8.       ├─rxode2::rxUiGet(.obj)
    9.       └─posologyr:::rxUiGet.posologyr(.obj)
   10.         ├─base::eval(rxUiGet.posologyr_ppk_model(x, ...))
   11.         │ └─base::eval(rxUiGet.posologyr_ppk_model(x, ...))
   12.         └─rxode2::rxode2(...)
   13.           └─.env$compile()
   14.             ├─base::with(...)
   15.             └─base::with.default(...)
   16.               └─base::eval(substitute(expr), data, enclos = parent.frame())
   17.                 └─base::eval(substitute(expr), data, enclos = parent.frame())
   18.                   ├─.rx$.rxWithWd(...)
   19.                   │ └─base::force(code)
   20.                   ├─.rx$rxCompile(.mv, debug = debug, package = NULL)
   21.                   └─rxode2:::rxCompile.rxModelVars(.mv, debug = debug, package = NULL)
   22.                     └─rxode2 (local) .badBuild("error building model")
  
  [ FAIL 1 | WARN 1 | SKIP 4 | PASS 72 ]
  Error:
  ! Test failures.
  Execution halted