Running ‘testthat.R’ [270s/376s]
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")
  Model:
  
  KA=THETA_KA*exp(ETA_KA);
  CL=THETA_CL*exp(ETA_CL);
  V=THETA_V*exp(ETA_V)*BW/70;
  S2=V;
  ARM=ARM;
  EVENT_RELATED=EVENT_RELATED;
  d/dt(A_DEPOT)=-KA*A_DEPOT;
  d/dt(A_CENTRAL)=-CL*A_CENTRAL/V+KA*A_DEPOT;
  d/dt(A_OUTPUT)=CL*A_CENTRAL/V;
  F=A_CENTRAL/S2;
  CP=F;
  OBS_CP=CP*(EPS_PROP+1);
  Y=OBS_CP;
  
  
  ---:: stderr ::---------------------------------------------
  
  ------------------------------------------------------------
  
  ---:: stderr ::---------------------------------------------
  
  ------------------------------------------------------------
  
  ---:: stderr ::---------------------------------------------
  
  ------------------------------------------------------------
  [ FAIL 3 | WARN 200 | SKIP 26 | PASS 519 ]
  
  ══ Skipped tests (26) ══════════════════════════════════════════════════════════
  • empty test (26): 'testSimulateEvents.R:8:1', 'testSimulateEvents.R:32:1',
    'testSimulateEvents.R:55:1', 'testSimulateEvents.R:79:1',
    'testSimulateEvents.R:112:1', 'testSimulateEventsLogic.R:8:1',
    'testSimulateEventsLogic.R:41:1', 'testSimulateEventsLogic.R:79:1',
    'testSimulateEventsLogic.R:125:1', 'testSimulateEventsLogic.R:148:1',
    'testSimulateIOV.R:8:1', 'testSimulateIOV.R:47:1', 'testSimulateIOV.R:79:1',
    'testSimulateIOV.R:129:1', 'testSimulateIOV.R:193:1',
    'testSimulateIOV.R:241:1', 'testSimulateInfusion.R:8:1',
    'testSimulateNocbLocf.R:8:1', 'testSimulateNocbLocf.R:49:1',
    'testSimulateNocbLocf.R:89:1', 'testSimulateReplicates.R:9:1',
    'testSimulateReplicates.R:26:1', 'testSimulateReplicates.R:50:1',
    'testSimulateReplicates.R:71:1', 'testSimulateReplicates.R:107:1',
    'testSimulateTTEModels.R:7:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (???): Simulate scenarios - make few changes on model (rxode2/mrgsolve) ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `(function (.x, .y, .f, ..., .progress = FALSE) 
  {
      map2_("list", .x, .y, .f, ..., .progress = .progress)
  })(.x = list(new("campsis_model", model = new("code_records", 
      list = list(new("main_record", comment = NA_character_, statements = new("model_statements", 
          list = list(new("equation", lhs = "KA", rhs = "THETA_KA*exp(ETA_KA)", 
              comment = NA_character_), new("equation", lhs = "CL", 
              rhs = "THETA_CL*exp(ETA_CL)", comment = NA_character_), 
              new("equation", lhs = "V2", rhs = "THETA_V2*exp(ETA_V2)", 
                  comment = NA_character_), new("equation", lhs = "V3", 
                  rhs = "THETA_V3*exp(ETA_V3)", comment = NA_character_), 
              new("equation", lhs = "Q", rhs = "THETA_Q*exp(ETA_Q)", 
                  comment = NA_character_), new("equation", lhs = "S2", 
                  rhs = "V2", comment = NA_character_)), type = "model_statement")), 
          new("ode_record", comment = NA_character_, statements = new("model_statements", 
              list = list(new("ode", lhs = "A_DEPOT", rhs = "-KA*A_DEPOT", 
                  comment = NA_character_), new("ode", lhs = "A_CENTRAL", 
                  rhs = "KA*A_DEPOT + Q*A_PERIPHERAL/V3 + (-CL/V2 - Q/V2)*A_CENTRAL", 
                  comment = NA_character_), new("ode", lhs = "A_PERIPHERAL", 
                  rhs = "-Q*A_PERIPHERAL/V3 + Q*A_CENTRAL/V2", 
                  comment = NA_character_), new("ode", lhs = "A_OUTPUT", 
                  rhs = "CL*A_CENTRAL/V2", comment = NA_character_), 
                  new("equation", lhs = "F", rhs = "A_CENTRAL/S2", 
                    comment = NA_character_)), type = "model_statement")), 
          new("error_record", comment = NA_character_, statements = new("model_statements", 
              list = list(new("equation", lhs = "CP", rhs = "F", 
                  comment = NA_character_), new("equation", lhs = "OBS_CP", 
                  rhs = "CP*(EPS_PROP + 1)", comment = NA_character_), 
                  new("equation", lhs = "Y", rhs = "OBS_CP", comment = NA_character_)), 
              type = "model_statement"))), type = "code_record"), 
      parameters = new("parameters", varcov = structure(numeric(0), dim = c(0L, 
      0L)), list = list(new("theta", name = "KA", index = 1L, value = 1, 
          fix = FALSE), new("theta", name = "CL", index = 2L, value = 5, 
          fix = FALSE), new("theta", name = "V2", index = 3L, value = 80, 
          fix = FALSE), new("theta", name = "V3", index = 4L, value = 20, 
          fix = FALSE), new("theta", name = "Q", index = 5L, value = 4, 
          fix = FALSE), new("omega", same = NA, index2 = 1L, type = "var", 
          name = "KA", index = 1L, value = 0.025, fix = FALSE), 
          new("omega", same = NA, index2 = 2L, type = "var", name = "CL", 
              index = 2L, value = 0.025, fix = FALSE), new("omega", 
              same = NA, index2 = 3L, type = "var", name = "V2", 
              index = 3L, value = 0.025, fix = FALSE), new("omega", 
              same = NA, index2 = 4L, type = "var", name = "V3", 
              index = 4L, value = 0.025, fix = FALSE), new("omega", 
              same = NA, index2 = 5L, type = "var", name = "Q", 
              index = 5L, value = 0.025, fix = FALSE), new("sigma", 
              index2 = 1L, type = "var", name = "PROP", index = 1L, 
              value = 0.025, fix = FALSE)), type = "parameter"), 
      compartments = new("compartments", properties = new("compartment_properties", 
          list = list(), type = "compartment_property"), list = list(
          new("compartment", name = "DEPOT", index = 1L), new("compartment", 
              name = "CENTRAL", index = 2L), new("compartment", 
              name = "PERIPHERAL", index = 3L), new("compartment", 
              name = "OUTPUT", index = 4L)), type = "compartment"))), 
      .y = 1L, .f = function (...) 
      {
          NULL
          NULL
          ...furrr_out <- ...furrr_fn(...)
          ...furrr_out
      })`: ℹ In index: 1.
  Caused by error:
  ℹ In index: 1.
  Caused by error in `rxCompile.rxModelVars()`:
  ! something went wrong in compilation
  ── Failure (???): Body weight as a true time varying covariate (rxode2/mrgsolve) ──
  `results1` not equal to `results2`.
  Component "CP": Mean relative difference: 0.2275966
  Backtrace:
      ▆
   1. └─global outputRegressionTest(results, output = "CP", filename = regFilename)
   2.   └─testthat::expect_equal(results1, results2)
  ── Failure (???): Body weight as a true time varying covariate (rxode2/mrgsolve) ──
  `results1` not equal to `results2`.
  Component "CP": Mean relative difference: 0.2275966
  Backtrace:
      ▆
   1. └─global outputRegressionTest(results, output = "CP", filename = regFilename)
   2.   └─testthat::expect_equal(results1, results2)
  
  [ FAIL 3 | WARN 200 | SKIP 26 | PASS 519 ]
  Error: Test failures
  Execution halted
  Error in unserialize(node$con) : error reading from connection
  Calls: workRSOCK ... doTryCatch -> recvData -> recvData.SOCK0node -> unserialize
  Execution halted
  Error in unserialize(node$con) : error reading from connection
  Calls: workRSOCK ... doTryCatch -> recvData -> recvData.SOCK0node -> unserialize
  Execution halted
  Error in unserialize(node$con) : error reading from connection
  Calls: workRSOCK ... doTryCatch -> recvData -> recvData.SOCK0node -> unserialize
  Execution halted