Running ‘testthat.R’ [39s/47s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(campsis)
  Loading required package: campsismod
  
  Attaching package: 'campsismod'
  
  The following object is masked from 'package:utils':
  
      find
  
  The following objects are masked from 'package:base':
  
      Position, as.data.frame, replace, sort, toString, write
  
  
  Attaching package: 'campsis'
  
  The following object is masked from 'package:stats':
  
      simulate
  
  The following object is masked from 'package:base':
  
      sample
  
  > test_check("campsis")
  
  ---:: stderr ::---------------------------------------------
  
  ------------------------------------------------------------
  
  ---:: stderr ::---------------------------------------------
  
  ------------------------------------------------------------
  [ FAIL 41 | WARN 48 | SKIP 25 | PASS 308 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • empty test (25)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('testCompilationError.R:19:7'): Incorrect Campsis model does not compile and a clear error message is shown (rxode2/mrgsolve) ──
  `simulate(model = model, dataset = ds, dest = destEngine)` threw an error with unexpected message.
  Expected match: "The following parameter\\(s\\) are required for solving: BW"
  Actual message: "Simulation engine 'rxode2' is not installed"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at testCompilationError.R:19:6
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─campsis::simulate(model = model, dataset = ds, dest = destEngine)
   7.   └─campsis:::preprocessDest(dest)
  ── Failure ('testSimulateArguments.R:35:3'): Auto seed value vs fix seed + default engine ──
  all(c("KA", "CL", "V2") %in% colnames(results1)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Error (???): Simulate a bolus, 2 arms, F1 only in arm1, in dataset (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% simulate(dataset, dest = destEngine, seed = seed)
   2. └─campsis::simulate(., dataset, dest = destEngine, seed = seed)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a simple bolus with bioavailability, dataset versus model (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% simulate(dataset, dest = destEngine, seed = seed)
   2. └─campsis::simulate(., dataset, dest = destEngine, seed = seed)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate several fixed F's at once (rxode2/mrgsolve) ───────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% disable("IIV") %>% ...
   2. └─campsis::simulate(., dataset, dest = destEngine, seed = seed)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a bolus (rxode2/mrgsolve) ─────────────────────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a bolus, 2 arms (rxode2/mrgsolve) ─────────────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% simulate(dataset, dest = destEngine, seed = seed)
   2. └─campsis::simulate(., dataset, dest = destEngine, seed = seed)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a bolus, 2 labelled arms (rxode2/mrgsolve) ────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% simulate(dataset, dest = destEngine, seed = seed)
   2. └─campsis::simulate(., dataset, dest = destEngine, seed = seed)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Bolus and infusion in CMT 1 (rxode2/mrgsolve) ──────────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error ('testSimulateDeclare.R:24:7'): Declare argument with mrgsolve ────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% ... at testSimulateDeclare.R:24:6
   2. └─campsis::simulate(...)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Dose adaptations based on weight work well (rxode2/mrgsolve) ───
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Dose adaptations preserve specified infusion duration (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Dose adaptations preserve specified infusion rate (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Dose adaptations based on weight work well, check argument compartments works as expected (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Dose adaptations can be checked in CAMPSIS output if dosing is TRUE (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate infusion using rate in dataset (rxode2/mrgsolve) ──────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate infusion using rate and lag time in dataset (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate infusion using rate and lag time (parameter distribution) in dataset (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate initial conditions, observations starting at 0 (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate initial conditions, observations starting at 5 (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a bolus with fixed lag time in dataset (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% simulate(dataset, dest = destEngine, seed = seed)
   2. └─campsis::simulate(., dataset, dest = destEngine, seed = seed)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a bolus with fixed lag time in model (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. ├─model %>% simulate(dataset, dest = destEngine, seed = seed)
   2. └─campsis::simulate(., dataset, dest = destEngine, seed = seed)
   3.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a minimalist model, no parameters/IIV/error model (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a 1-cpt model without OMEGA's/SIGMA's - Github issue #8 (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): NULL outvars (rxode2/mrgsolve) ─────────────────────────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Not NULL outvars (rxode2/mrgsolve) ─────────────────────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Not NULL outvars + DROP_OTHERS (rxode2/mrgsolve) ───────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Not NULL outvars from ERROR block + DROP_OTHERS (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Covariates in outvars can be output well (rxode2/mrgsolve) ─────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): ETAs in outvars can be output well (rxode2/mrgsolve) ───────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Test generated RUV is correct (rxode2/mrgsolve) ────────────────
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate scenarios - make few changes on dataset (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate scenarios - make few changes on model (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Weibull model simulation works as expected (rxode2/mrgsolve) ───
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a bolus using the tabular dataset (rxode2/mrgsolve) ───
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Body weight as a true time varying covariate (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Error (???): Body weight as a true time varying covariate, 2 arms, individual body weights (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Failure (???): Simulate a bolus without observation (rxode2/mrgsolve) ───────
  `simulate(...)` threw an error with unexpected message.
  Expected match: "Dataset does not contain any observation"
  Actual message: "Simulation engine 'rxode2' is not installed"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...)
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─campsis::simulate(...)
   7.   └─campsis:::preprocessDest(dest)
  ── Error (???): Simulate a bolus with single observation at time 0 (rxode2/mrgsolve) ──
  Error in `preprocessDest(dest)`: Simulation engine 'rxode2' is not installed
  Backtrace:
      ▆
   1. └─campsis::simulate(...)
   2.   └─campsis:::preprocessDest(dest)
  ── Failure (???): Simulate a model which is not valid (rxode2/mrgsolve) ────────
  `simulate(...)` threw an error with unexpected message.
  Expected match: "name is length 2. Should be 1."
  Actual message: "Simulation engine 'rxode2' is not installed"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...)
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─campsis::simulate(...)
   7.   └─campsis:::preprocessDest(dest)
  ── Failure (???): Simulate a dataset which is not valid (rxode2/mrgsolve) ──────
  `simulate(...)` threw an error with unexpected message.
  Expected match: "amount is length 2. Should be 1."
  Actual message: "Simulation engine 'rxode2' is not installed"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...)
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─campsis::simulate(...)
   7.   └─campsis:::preprocessDest(dest)
  
  [ FAIL 41 | WARN 48 | SKIP 25 | PASS 308 ]
  Error: Test failures
  Execution halted