Running ‘testthat.R’ [50s/79s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(joineR)
  Loading required package: survival
  > 
  > test_check("joineR")
  80% experienced event
  40% experienced event
  70% experienced event
  100% experienced event
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 85 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-comprisk.R:17'): competing risks models ────────────────────────
  Error in `model.frame.default(data = FALSE, formula = ~treat, xlev = list(
      treat = c("CBZ", "LTG")))`: 'data' must be a data.frame, environment, or list
  Backtrace:
      ▆
   1. └─joineR::joint(...) at test-comprisk.R:17:2
   2.   └─joineR:::survstCR(survdat, surv.formula, survdat2, event = 1)
   3.     └─survival::basehaz(surv.start, FALSE)
   4.       ├─survival::survfit(fit, newdata = newdata, se.fit = FALSE)
   5.       └─survival:::survfit.coxph(fit, newdata = newdata, se.fit = FALSE)
   6.         ├─base::eval(tcall)
   7.         │ └─base::eval(tcall)
   8.         ├─stats::model.frame(data = FALSE, formula = ~treat, xlev = `<named list>`)
   9.         └─stats::model.frame.default(data = FALSE, formula = ~treat, xlev = `<named list>`)
  ── Error ('test-comprisk.R:54'): bootstrap SEs with competing risks ────────────
  Error in `model.frame.default(data = FALSE, formula = ~treat, xlev = list(
      treat = c("CBZ", "LTG")))`: 'data' must be a data.frame, environment, or list
  Backtrace:
      ▆
   1. └─joineR::joint(...) at test-comprisk.R:54:2
   2.   └─joineR:::survstCR(survdat, surv.formula, survdat2, event = 1)
   3.     └─survival::basehaz(surv.start, FALSE)
   4.       ├─survival::survfit(fit, newdata = newdata, se.fit = FALSE)
   5.       └─survival:::survfit.coxph(fit, newdata = newdata, se.fit = FALSE)
   6.         ├─base::eval(tcall)
   7.         │ └─base::eval(tcall)
   8.         ├─stats::model.frame(data = FALSE, formula = ~treat, xlev = `<named list>`)
   9.         └─stats::model.frame.default(data = FALSE, formula = ~treat, xlev = `<named list>`)
  ── Error ('test-comprisk.R:77'): ordering of subjects with competing risks ─────
  Error in `model.frame.default(data = FALSE, formula = ~treat, xlev = list(
      treat = c("CBZ", "LTG")))`: 'data' must be a data.frame, environment, or list
  Backtrace:
      ▆
   1. └─joineR::joint(...) at test-comprisk.R:77:2
   2.   └─joineR:::survstCR(survdat, surv.formula, survdat2, event = 1)
   3.     └─survival::basehaz(surv.start, FALSE)
   4.       ├─survival::survfit(fit, newdata = newdata, se.fit = FALSE)
   5.       └─survival:::survfit.coxph(fit, newdata = newdata, se.fit = FALSE)
   6.         ├─base::eval(tcall)
   7.         │ └─base::eval(tcall)
   8.         ├─stats::model.frame(data = FALSE, formula = ~treat, xlev = `<named list>`)
   9.         └─stats::model.frame.default(data = FALSE, formula = ~treat, xlev = `<named list>`)
  ── Error ('test-comprisk.R:116'): competing risks model with covariates ────────
  Error in `model.frame.default(data = FALSE, formula = ~gender + age, xlev = list(
      gender = c("F", "M")))`: 'data' must be a data.frame, environment, or list
  Backtrace:
      ▆
   1. └─joineR::joint(...) at test-comprisk.R:116:2
   2.   └─joineR:::survstCR(survdat, surv.formula, survdat2, event = 1)
   3.     └─survival::basehaz(surv.start, FALSE)
   4.       ├─survival::survfit(fit, newdata = newdata, se.fit = FALSE)
   5.       └─survival:::survfit.coxph(fit, newdata = newdata, se.fit = FALSE)
   6.         ├─base::eval(tcall)
   7.         │ └─base::eval(tcall)
   8.         ├─stats::model.frame(data = FALSE, formula = ~gender + age, xlev = `<named list>`)
   9.         └─stats::model.frame.default(...)
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 85 ]
  Error: Test failures
  Execution halted