CRAN Package Check Results for Package ertte

Last updated on 2026-10-24 09:50:51 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.1.1 6.58 198.73 205.31 OK
r-devel-linux-x86_64-debian-gcc 0.1.1 5.43 72.44 77.87 ERROR
r-devel-linux-x86_64-fedora-clang 0.1.1 6.00 142.48 148.48 OK
r-devel-linux-x86_64-fedora-gcc 0.1.1 6.00 145.23 151.23 OK
r-devel-windows-x86_64 0.1.1 9.00 190.00 199.00 OK
r-patched-linux-x86_64 0.1.1 7.73 187.83 195.56 OK
r-release-linux-x86_64 0.1.1 6.12 189.92 196.04 OK
r-release-macos-arm64 0.1.1 2.00 42.00 44.00 OK
r-release-macos-x86_64 0.1.1 5.00 267.00 272.00 OK
r-release-windows-x86_64 0.1.1 11.00 179.00 190.00 OK
r-oldrel-macos-arm64 0.1.1 3.00 52.00 55.00 OK
r-oldrel-macos-x86_64 0.1.1 5.00 200.00 205.00 OK
r-oldrel-windows-x86_64 0.1.1 12.00 267.00 279.00 OK

Check Details

Version: 0.1.1
Check: examples
Result: ERROR Running examples in ‘ertte-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: ertte_fun > ### Title: Prediction function for an exposure-response TTE model > ### Aliases: ertte_fun ertte_fun.ertte_aft ertte_fun.ertte_coxph > > ### ** Examples > > # fit an AFT model > mod_aft <- ertte_aft(Surv(time, event) ~ aucss, ertte_data) > mod_aft_fun <- ertte_fun(mod_aft) > > # when called with no arguments it reproduces the fitted > # model's own survival predictions > s1 <- mod_aft_fun(time = 60) > s1[1:5] [1] 0.3925581 0.5653608 0.7080801 0.7080801 0.2939277 > > # when called with an explicit parameter vector, the model > # is evaluated at those modified parameters > par_new <- coef(mod_aft) > par_new["(Intercept)"] <- par_new["(Intercept)"] + 1 > s2 <- mod_aft_fun(param = par_new, time = 60) > s2[1:5] [1] 0.7933096 0.8683024 0.9180736 0.9180736 0.7384583 > > # the same logic applies for Cox regression models > mod_cox <- ertte_coxph(Surv(time, event) ~ aucss, ertte_data) > mod_cox_fun <- ertte_fun(mod_cox) Error in a$specials[[i]] : subscript out of bounds Calls: ertte_fun -> ertte_fun.ertte_coxph -> <Anonymous> -> off Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.1
Check: tests
Result: ERROR Running ‘testthat.R’ [22s/25s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(ertte) > > test_check("ertte") Saving _problems/test-er-methods-65.R Saving _problems/test-er-methods-132.R Saving _problems/test-er-methods-146.R Saving _problems/test-er-methods-295.R Saving _problems/test-er-methods-311.R Saving _problems/test-er-methods-453.R Saving _problems/test-ertte-censoring-31.R Saving _problems/test-ertte-censoring-71.R Saving _problems/test-ertte-coxph-69.R Saving _problems/test-ertte-coxph-77.R Saving _problems/test-ertte-coxph-89.R Saving _problems/test-ertte-coxph-99.R Saving _problems/test-ertte-coxph-105.R Saving _problems/test-ertte-coxph-116.R Saving _problems/test-ertte-coxph-139.R Saving _problems/test-ertte-coxph-152.R Saving _problems/test-ertte-coxph-159.R Saving _problems/test-ertte-coxph-185.R Saving _problems/test-ertte-coxph-199.R Saving _problems/test-ertte-coxph-206.R Saving _problems/test-ertte-coxph-228.R Saving _problems/test-ertte-edge-cases-77.R Saving _problems/test-ertte-edge-cases-105.R Saving _problems/test-ertte-edge-cases-117.R Saving _problems/test-ertte-edge-cases-168.R Saving _problems/test-ertte-edge-cases-190.R Saving _problems/test-ertte-landmark-16.R Saving _problems/test-ertte-landmark-82.R Saving _problems/test-ertte-power-62.R Saving _problems/test-ertte-rmst-18.R Saving _problems/test-ertte-rmst-32.R Saving _problems/test-ertte-rmst-53.R Saving _problems/test-ertte-rmst-91.R Saving _problems/test-ertte-rmst-109.R Saving _problems/test-ertte-rmst-125.R Saving _problems/test-ertte-rmst-174.R [ FAIL 36 | WARN 1 | SKIP 0 | PASS 293 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-er-methods.R:65:3'): er_simulate.ertte_model() with tau adds fit_resp/sim_resp, matching ertte_rmst() ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. └─ertte:::er_simulate.ertte_model(...) at test-er-methods.R:65:3 2. ├─ertte:::.ertte_simulate_draws(...) 3. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 4. └─stats::delete.response(stats::terms(object)) 5. └─stats (local) off(a$specials[[i]]) ── Error ('test-er-methods.R:129:3'): er_predict_survival.ertte_model() matches ertte_predict() for strictly positive time_grid ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-er-methods.R:129:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─ertte:::er_predict_survival.ertte_model(mod_cox, nd, tg) 5. ├─ertte::ertte_predict(...) 6. └─ertte:::ertte_predict.ertte_coxph(...) 7. ├─survival::survfit(...) 8. └─survival:::survfit.coxph(...) 9. └─survival:::model.matrix.coxph(object, data = mf) 10. └─stats::delete.response(object$terms) 11. └─stats (local) off(a$specials[[i]]) ── Error ('test-er-methods.R:146:5'): er_predict_survival.ertte_model() treats time_grid = 0 as S(0) = 1, for both engines ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. └─ertte:::er_predict_survival.ertte_model(mod, nd, tg) at test-er-methods.R:146:5 2. ├─ertte::ertte_predict(...) 3. └─ertte:::ertte_predict.ertte_coxph(...) 4. ├─survival::survfit(...) 5. └─survival:::survfit.coxph(...) 6. └─survival:::model.matrix.coxph(object, data = mf) 7. └─stats::delete.response(object$terms) 8. └─stats (local) off(a$specials[[i]]) ── Error ('test-er-methods.R:295:3'): er_predict_survival.ertte_model() propagates NA for a single-level-factor ertte_aft model, but returns finite values for ertte_coxph ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. └─ertte:::er_predict_survival.ertte_model(...) at test-er-methods.R:295:3 2. ├─ertte::ertte_predict(...) 3. └─ertte:::ertte_predict.ertte_coxph(...) 4. ├─survival::survfit(...) 5. └─survival:::survfit.coxph(...) 6. └─survival:::model.matrix.coxph(object, data = mf) 7. └─stats::delete.response(object$terms) 8. └─stats (local) off(a$specials[[i]]) ── Error ('test-er-methods.R:309:3'): er_tte_add_model() renders one curve per stratum for an ertte_coxph model ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. └─erplots::er_tte_add_model(...) at test-er-methods.R:309:3 2. └─erplots:::.layer_tte_model(...) 3. └─erplots:::.compute_tte_model_config(object, config) 4. ├─rlang::exec(...) 5. ├─erplots (local) `<fn>`(...) 6. └─ertte:::er_predict_survival.ertte_model(...) 7. ├─ertte::ertte_predict(...) 8. └─ertte:::ertte_predict.ertte_coxph(...) 9. ├─survival::survfit(...) 10. └─survival:::survfit.coxph(...) 11. └─survival:::model.matrix.coxph(object, data = mf) 12. └─stats::delete.response(object$terms) 13. └─stats (local) off(a$specials[[i]]) ── Error ('test-er-methods.R:448:3'): tau reaches an RMST VPC through erplots' er_vpc_add_simulated(simulate_args = ...) ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. └─erplots::er_vpc_add_simulated(...) at test-er-methods.R:448:3 2. ├─rlang::exec(...) 3. ├─erplots (local) `<fn>`(...) 4. └─ertte:::er_simulate.ertte_model(...) 5. ├─ertte:::.ertte_simulate_draws(...) 6. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 7. └─stats::delete.response(stats::terms(object)) 8. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-censoring.R:31:3'): default simulation leaves event rows uncensored (ertte_coxph) ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─stats::simulate(mod, nsim = 30, seed = 502) at test-ertte-censoring.R:31:3 2. └─ertte:::simulate.ertte_model(mod, nsim = 30, seed = 502) 3. └─ertte:::.ertte_resample(...) 4. ├─ertte:::.ertte_simulate_draws(...) 5. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 6. └─stats::delete.response(stats::terms(object)) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-censoring.R:71:3'): coxph simulation treats draws beyond the baseline hazard's support as censored, not events ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─stats::simulate(mod, nsim = 200, seed = 506) at test-ertte-censoring.R:71:3 2. └─ertte:::simulate.ertte_model(mod, nsim = 200, seed = 506) 3. └─ertte:::.ertte_resample(...) 4. ├─ertte:::.ertte_simulate_draws(...) 5. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 6. └─stats::delete.response(stats::terms(object)) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:69:3'): ertte_fun() on ertte_coxph reproduces the fitted model's own predictions ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_fun(mod) at test-ertte-coxph.R:69:3 2. └─ertte:::ertte_fun.ertte_coxph(mod) 3. └─stats::delete.response(stats::terms(object)) 4. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:77:3'): ertte_fun() on ertte_coxph works with custom newdata and vectorised time ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_fun(mod) at test-ertte-coxph.R:77:3 2. └─ertte:::ertte_fun.ertte_coxph(mod) 3. └─stats::delete.response(stats::terms(object)) 4. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:89:3'): ertte_fun() on ertte_coxph responds to a custom param ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_fun(mod) at test-ertte-coxph.R:89:3 2. └─ertte:::ertte_fun.ertte_coxph(mod) 3. └─stats::delete.response(stats::terms(object)) 4. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:99:3'): ertte_fun() on ertte_coxph checks param length ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_fun(mod) at test-ertte-coxph.R:99:3 2. └─ertte:::ertte_fun.ertte_coxph(mod) 3. └─stats::delete.response(stats::terms(object)) 4. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:105:3'): ertte_fun() on ertte_coxph validates time the same way ertte_predict() does ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_fun(mod) at test-ertte-coxph.R:105:3 2. └─ertte:::ertte_fun.ertte_coxph(mod) 3. └─stats::delete.response(stats::terms(object)) 4. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:116:3'): ertte_fun() on ertte_coxph's closure takes data before param (issue #6) ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_fun(mod) at test-ertte-coxph.R:116:3 2. └─ertte:::ertte_fun.ertte_coxph(mod) 3. └─stats::delete.response(stats::terms(object)) 4. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:139:3'): ertte_predict() on ertte_coxph returns a tidy tibble with sane survival probabilities ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_predict(...) at test-ertte-coxph.R:139:3 2. └─ertte:::ertte_predict.ertte_coxph(...) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:152:3'): ertte_predict() on ertte_coxph handles a single-row newdata ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_predict(...) at test-ertte-coxph.R:152:3 2. └─ertte:::ertte_predict.ertte_coxph(...) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:159:3'): ertte_predict() on ertte_coxph extrapolates times beyond the observed range ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_predict(...) at test-ertte-coxph.R:159:3 2. └─ertte:::ertte_predict.ertte_coxph(...) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:185:3'): simulate() on ertte_coxph has the expected shape ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─stats::simulate(mod, nsim = 5, seed = 321) at test-ertte-coxph.R:185:3 2. └─ertte:::simulate.ertte_model(mod, nsim = 5, seed = 321) 3. └─ertte:::.ertte_resample(...) 4. ├─ertte:::.ertte_simulate_draws(...) 5. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 6. └─stats::delete.response(stats::terms(object)) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:199:3'): simulate() on ertte_coxph is reproducible given a seed ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─stats::simulate(mod, nsim = 5, seed = 42) at test-ertte-coxph.R:199:3 2. └─ertte:::simulate.ertte_model(mod, nsim = 5, seed = 42) 3. └─ertte:::.ertte_resample(...) 4. ├─ertte:::.ertte_simulate_draws(...) 5. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 6. └─stats::delete.response(stats::terms(object)) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:206:3'): simulate() on ertte_coxph reports an auto-picked seed ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─testthat::expect_message(simulate(mod, nsim = 5), "Using seed") at test-ertte-coxph.R:206:3 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─stats::simulate(mod, nsim = 5) 8. └─ertte:::simulate.ertte_model(mod, nsim = 5) 9. └─ertte:::.ertte_resample(...) 10. ├─ertte:::.ertte_simulate_draws(...) 11. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 12. └─stats::delete.response(stats::terms(object)) 13. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-coxph.R:228:3'): simulate() on ertte_coxph reproduces the fitted baseline survival curve ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─stats::simulate(mod, nsim = 1, newdata = nd, seed = 777) at test-ertte-coxph.R:228:3 2. └─ertte:::simulate.ertte_model(mod, nsim = 1, newdata = nd, seed = 777) 3. └─ertte:::.ertte_resample(...) 4. ├─ertte:::.ertte_simulate_draws(...) 5. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 6. └─stats::delete.response(stats::terms(object)) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-edge-cases.R:77:3'): ertte_predict.ertte_coxph() still returns finite predictions for an aliased single-level factor term ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_predict(mod, dat[1:3, ], time = c(30, 60)) at test-ertte-edge-cases.R:77:3 2. └─ertte:::ertte_predict.ertte_coxph(...) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-edge-cases.R:105:3'): ertte_coxph() fits normally under heavy ties in event times ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_predict(mod, dat[1:5, ], time = c(30, 60)) at test-ertte-edge-cases.R:105:3 2. └─ertte:::ertte_predict.ertte_coxph(...) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-edge-cases.R:117:3'): simulate() reproduces sensible event times under heavy ties ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─stats::simulate(mod, newdata = dat[1:10, ], nsim = 5, seed = 33) at test-ertte-edge-cases.R:117:3 2. └─ertte:::simulate.ertte_model(...) 3. └─ertte:::.ertte_resample(...) 4. ├─ertte:::.ertte_simulate_draws(...) 5. └─ertte:::.ertte_simulate_draws.ertte_coxph(...) 6. └─stats::delete.response(stats::terms(object)) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-edge-cases.R:168:3'): ertte_predict.ertte_coxph() handles conf_level = 0/1 like ertte_predict.ertte_aft() does ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_predict(mod_cox, nd3, time = 30, conf_level = 0) at test-ertte-edge-cases.R:168:3 2. └─ertte:::ertte_predict.ertte_coxph(mod_cox, nd3, time = 30, conf_level = 0) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-edge-cases.R:190:3'): ertte_rmst.ertte_coxph() handles conf_level = 0/1 without erroring, matching the AFT engine's pattern ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_rmst(mod_cox, nd3, tau = 60, conf_level = 0) at test-ertte-edge-cases.R:190:3 2. └─ertte:::ertte_rmst.ertte_coxph(mod_cox, nd3, tau = 60, conf_level = 0) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-landmark.R:16:3'): ertte_landmark() is 1 - ertte_predict() with CI bounds swapped (Cox PH) ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. └─ertte::ertte_landmark(mod, nd, landmark_time = 90) at test-ertte-landmark.R:16:3 2. ├─ertte::ertte_predict(...) 3. └─ertte:::ertte_predict.ertte_coxph(...) 4. ├─survival::survfit(...) 5. └─survival:::survfit.coxph(...) 6. └─survival:::model.matrix.coxph(object, data = mf) 7. └─stats::delete.response(object$terms) 8. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-landmark.R:82:5'): ertte_landmark() recomputes landmark_time/fit_resp/ci_lower/ci_upper even when newdata already has columns of those names ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. └─ertte::ertte_landmark(mod, grid, landmark_time = 90) at test-ertte-landmark.R:82:5 2. ├─ertte::ertte_predict(...) 3. └─ertte:::ertte_predict.ertte_coxph(...) 4. ├─survival::survfit(...) 5. └─survival:::survfit.coxph(...) 6. └─survival:::model.matrix.coxph(object, data = mf) 7. └─stats::delete.response(object$terms) 8. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-power.R:62:3'): ertte_coxph() also reuses the fitting-time ref via survfit() ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_predict(mod, newdata, time = c(30, 60)) at test-ertte-power.R:62:3 2. └─ertte:::ertte_predict.ertte_coxph(...) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-rmst.R:18:3'): ertte_rmst() on ertte_coxph returns a tidy tibble with sane RMST values ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_rmst(mod, ertte_data[1:5, ], tau = c(30, 60, 90)) at test-ertte-rmst.R:18:3 2. └─ertte:::ertte_rmst.ertte_coxph(...) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-rmst.R:32:3'): ertte_rmst() on ertte_coxph matches a hand-computed step-function integral ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_rmst(mod, prof, tau = tau) at test-ertte-rmst.R:32:3 2. └─ertte:::ertte_rmst.ertte_coxph(mod, prof, tau = tau) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-rmst.R:53:3'): ertte_rmst()'s Cox SE is not just the population-level Greenwood term ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_rmst(mod, prof_hi, tau = tau) at test-ertte-rmst.R:53:3 2. └─ertte:::ertte_rmst.ertte_coxph(mod, prof_hi, tau = tau) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-rmst.R:91:3'): ertte_rmst() defaults newdata to the fitted data ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─testthat::expect_equal(nrow(ertte_rmst(mod_cox, tau = 90)), nrow(ertte_data)) at test-ertte-rmst.R:91:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(ertte_rmst(mod_cox, tau = 90)) 5. ├─ertte::ertte_rmst(mod_cox, tau = 90) 6. └─ertte:::ertte_rmst.ertte_coxph(mod_cox, tau = 90) 7. ├─survival::survfit(...) 8. └─survival:::survfit.coxph(...) 9. └─survival:::model.matrix.coxph(object, data = mf) 10. └─stats::delete.response(object$terms) 11. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-rmst.R:106:3'): ertte_rmst() on ertte_coxph warns when tau exceeds the observed follow-up range ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-ertte-rmst.R:106:3 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─ertte::ertte_rmst(...) 8. └─ertte:::ertte_rmst.ertte_coxph(...) 9. ├─survival::survfit(...) 10. └─survival:::survfit.coxph(...) 11. └─survival:::model.matrix.coxph(object, data = mf) 12. └─stats::delete.response(object$terms) 13. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-rmst.R:125:3'): ertte_rmst() handles a single-row newdata for both engines ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-ertte-rmst.R:125:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(ertte_rmst(mod_cox, nd, tau = c(30, 60, 90))) 5. ├─ertte::ertte_rmst(mod_cox, nd, tau = c(30, 60, 90)) 6. └─ertte:::ertte_rmst.ertte_coxph(mod_cox, nd, tau = c(30, 60, 90)) 7. ├─survival::survfit(...) 8. └─survival:::survfit.coxph(...) 9. └─survival:::model.matrix.coxph(object, data = mf) 10. └─stats::delete.response(object$terms) 11. └─stats (local) off(a$specials[[i]]) ── Error ('test-ertte-rmst.R:174:5'): ertte_rmst() recomputes fit_rmst/ci_lower/ci_upper even when newdata already has columns of those names ── <subscriptOutOfBoundsError/error/condition> Error in `a$specials[[i]]`: subscript out of bounds Backtrace: ▆ 1. ├─ertte::ertte_rmst(mod, grid, tau = 90) at test-ertte-rmst.R:174:5 2. └─ertte:::ertte_rmst.ertte_coxph(mod, grid, tau = 90) 3. ├─survival::survfit(...) 4. └─survival:::survfit.coxph(...) 5. └─survival:::model.matrix.coxph(object, data = mf) 6. └─stats::delete.response(object$terms) 7. └─stats (local) off(a$specials[[i]]) [ FAIL 36 | WARN 1 | SKIP 0 | PASS 293 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-gcc