Last updated on 2026-10-24 01:51:57 CEST.
| Package | OK | ERROR |
|---|---|---|
| CausalMixGPD | 13 | |
| RMSTpowerBoost | 12 | 1 |
Current CRAN status: OK: 13
Current CRAN status: OK: 12, ERROR: 1
Version: 1.0.3
Check: examples
Result: ERROR
Running examples in ‘RMSTpowerBoost-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: MS.power.analytical
> ### Title: Analyze Power for a Multiplicative Stratified RMST Model
> ### (Analytic)
> ### Aliases: MS.power.analytical
>
> ### ** Examples
>
> set.seed(123)
> pilot_df_strat <- data.frame(
+ time = rexp(120, 0.15),
+ status = rbinom(120, 1, 0.6),
+ arm = rep(0:1, each = 60),
+ region = factor(rep(c("A", "B", "C"), each = 40))
+ )
> pilot_df_strat$time[pilot_df_strat$arm == 1] <- pilot_df_strat$time[pilot_df_strat$arm == 1] * 1.5
>
> power_results <- MS.power.analytical(
+ pilot_data = pilot_df_strat,
+ time_var = "time", status_var = "status", arm_var = "arm", strata_var = "region",
+ sample_sizes = c(50, 75, 100),
+ L = 10, alpha = 0.05
+ )
Error in a$specials[[i]] : subscript out of bounds
Calls: MS.power.analytical ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0.3
Check: tests
Result: ERROR
Running ‘testthat.R’ [80s/90s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(RMSTpowerBoost)
>
> test_check("RMSTpowerBoost")
Saving _problems/testthat-additive-78.R
Saving _problems/testthat-additive-89.R
Saving _problems/testthat-apps-49.R
Saving _problems/testthat-coverage-gates-230.R
Saving _problems/testthat-rmst-interface-230.R
Saving _problems/testthat-rmst-interface-239.R
Saving _problems/testthat-rmst-interface-247.R
Saving _problems/testthat-rmst-interface-258.R
Saving _problems/testthat-rmst-interface-295.R
Saving _problems/testthat-rmst-interface-317.R
Saving _problems/testthat-rmst-interface-328.R
Saving _problems/testthat-rmst-interface-353.R
Saving _problems/testthat-rmst-interface-380.R
`geom_line()`: Each group consists of only one observation.
i Do you need to adjust the group aesthetic?
Saving _problems/testthat_DC-38.R
Saving _problems/testthat_DC-60.R
Saving _problems/testthat_DC-74.R
Saving _problems/testthat_DC-94.R
Saving _problems/testthat_DC-102.R
Saving _problems/testthat_strat-57.R
Saving _problems/testthat_strat-71.R
Saving _problems/testthat_strat-86.R
[ FAIL 21 | WARN 0 | SKIP 1 | PASS 438 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• !file.exists(app_path) is TRUE (1): 'testthat-apps.R:216:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('testthat-additive.R:74:4'): additive.power.analytical works for stratified case ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::additive.power.analytical(...) at testthat-additive.R:74:4
2. └─survival::basehaz(fit_cens, centered = FALSE)
3. ├─survival::survfit(fit, se.fit = FALSE)
4. └─survival:::survfit.coxph(fit, se.fit = FALSE)
5. └─survival:::model.matrix.coxph(object, data = mf)
6. └─stats::delete.response(object$terms)
7. └─stats (local) off(a$specials[[i]])
── Error ('testthat-additive.R:85:4'): additive.ss.analytical finds a plausible N ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─testthat::expect_no_warning(...) at testthat-additive.R:85:4
2. │ └─testthat:::expect_no_(...)
3. │ └─testthat:::quasi_capture(enquo(object), NULL, capture)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─base::withRestarts(...)
6. │ │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
7. │ │ │ └─base (local) doWithOneRestart(return(expr), restart)
8. │ │ └─base::withCallingHandlers(...)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─RMSTpowerBoost::additive.ss.analytical(...)
11. └─survival::basehaz(fit_cens, centered = FALSE)
12. ├─survival::survfit(fit, se.fit = FALSE)
13. └─survival:::survfit.coxph(fit, se.fit = FALSE)
14. └─survival:::model.matrix.coxph(object, data = mf)
15. └─stats::delete.response(object$terms)
16. └─stats (local) off(a$specials[[i]])
── Error ('testthat-apps.R:46:3'): analytical functions return structured outputs ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::DC.power.analytical(...) at testthat-apps.R:46:3
2. └─survival::basehaz(fit_cens, centered = FALSE)
3. ├─survival::survfit(fit, se.fit = FALSE)
4. └─survival:::survfit.coxph(fit, se.fit = FALSE)
5. └─survival:::model.matrix.coxph(object, data = mf)
6. └─stats::delete.response(object$terms)
7. └─stats (local) off(a$specials[[i]])
── Error ('testthat-coverage-gates.R:224:3'): multiplicative analytical and bootstrap cover additional warning/error branches ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─testthat::expect_warning(...) at testthat-coverage-gates.R:224: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. └─RMSTpowerBoost::MS.ss.analytical(...)
8. └─survival::basehaz(fit_cens, centered = FALSE)
9. ├─survival::survfit(fit, se.fit = FALSE)
10. └─survival:::survfit.coxph(fit, se.fit = FALSE)
11. └─survival:::model.matrix.coxph(object, data = mf)
12. └─stats::delete.response(object$terms)
13. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:226:3'): rmst.power strata as formula sets strata metadata ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::rmst.power(...) at testthat-rmst-interface.R:226:3
2. ├─base::do.call(route$fn_power, args)
3. └─RMSTpowerBoost (local) `<fn>`(...)
4. └─survival::basehaz(fit_cens, centered = FALSE)
5. ├─survival::survfit(fit, se.fit = FALSE)
6. └─survival:::survfit.coxph(fit, se.fit = FALSE)
7. └─survival:::model.matrix.coxph(object, data = mf)
8. └─stats::delete.response(object$terms)
9. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:235:3'): rmst.power strata as character string sets strata metadata ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::rmst.power(...) at testthat-rmst-interface.R:235:3
2. ├─base::do.call(route$fn_power, args)
3. └─RMSTpowerBoost (local) `<fn>`(...)
4. └─survival::basehaz(fit_cens, centered = FALSE)
5. ├─survival::survfit(fit, se.fit = FALSE)
6. └─survival:::survfit.coxph(fit, se.fit = FALSE)
7. └─survival:::model.matrix.coxph(object, data = mf)
8. └─stats::delete.response(object$terms)
9. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:244:3'): rmst.power multiplicative strata sets N_per_Stratum n_col ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::rmst.power(...) at testthat-rmst-interface.R:244:3
2. ├─base::do.call(route$fn_power, args)
3. └─RMSTpowerBoost (local) `<fn>`(...)
4. └─survival::basehaz(fit_cens, centered = FALSE)
5. ├─survival::survfit(fit, se.fit = FALSE)
6. └─survival:::survfit.coxph(fit, se.fit = FALSE)
7. └─survival:::model.matrix.coxph(object, data = mf)
8. └─stats::delete.response(object$terms)
9. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:252:3'): rmst.power DC boot->analytical emits switching message ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─testthat::expect_message(...) at testthat-rmst-interface.R:252: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. └─RMSTpowerBoost::rmst.power(...)
8. ├─base::do.call(route$fn_power, args)
9. └─RMSTpowerBoost (local) `<fn>`(...)
10. └─survival::basehaz(fit_cens, centered = FALSE)
11. ├─survival::survfit(fit, se.fit = FALSE)
12. └─survival:::survfit.coxph(fit, se.fit = FALSE)
13. └─survival:::model.matrix.coxph(object, data = mf)
14. └─stats::delete.response(object$terms)
15. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:288:3'): rmst.ss DC boot->analytical emits switching message ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─testthat::expect_message(...) at testthat-rmst-interface.R:288: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. └─RMSTpowerBoost::rmst.ss(...)
8. ├─base::do.call(route$fn_ss, args)
9. └─RMSTpowerBoost (local) `<fn>`(...)
10. └─survival::basehaz(fit_cens, centered = FALSE)
11. ├─survival::survfit(fit, se.fit = FALSE)
12. └─survival:::survfit.coxph(fit, se.fit = FALSE)
13. └─survival:::model.matrix.coxph(object, data = mf)
14. └─stats::delete.response(object$terms)
15. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:313:3'): print.rmst_power shows strata line when strata is non-NULL ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::rmst.power(...) at testthat-rmst-interface.R:313:3
2. ├─base::do.call(route$fn_power, args)
3. └─RMSTpowerBoost (local) `<fn>`(...)
4. └─survival::basehaz(fit_cens, centered = FALSE)
5. ├─survival::survfit(fit, se.fit = FALSE)
6. └─survival:::survfit.coxph(fit, se.fit = FALSE)
7. └─survival:::model.matrix.coxph(object, data = mf)
8. └─stats::delete.response(object$terms)
9. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:323:3'): print.rmst_power shows Note when type was auto-switched ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─base::suppressMessages(...) at testthat-rmst-interface.R:323:3
2. │ └─base::withCallingHandlers(...)
3. └─RMSTpowerBoost::rmst.power(...)
4. ├─base::do.call(route$fn_power, args)
5. └─RMSTpowerBoost (local) `<fn>`(...)
6. └─survival::basehaz(fit_cens, centered = FALSE)
7. ├─survival::survfit(fit, se.fit = FALSE)
8. └─survival:::survfit.coxph(fit, se.fit = FALSE)
9. └─survival:::model.matrix.coxph(object, data = mf)
10. └─stats::delete.response(object$terms)
11. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:347:3'): print.rmst_ss shows Note when type was auto-switched ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─base::suppressMessages(...) at testthat-rmst-interface.R:347:3
2. │ └─base::withCallingHandlers(...)
3. └─RMSTpowerBoost::rmst.ss(...)
4. ├─base::do.call(route$fn_ss, args)
5. └─RMSTpowerBoost (local) `<fn>`(...)
6. └─survival::basehaz(fit_cens, centered = FALSE)
7. ├─survival::survfit(fit, se.fit = FALSE)
8. └─survival:::survfit.coxph(fit, se.fit = FALSE)
9. └─survival:::model.matrix.coxph(object, data = mf)
10. └─stats::delete.response(object$terms)
11. └─stats (local) off(a$specials[[i]])
── Error ('testthat-rmst-interface.R:376:3'): summary.rmst_power strata meta shows non-None Strata field ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::rmst.power(...) at testthat-rmst-interface.R:376:3
2. ├─base::do.call(route$fn_power, args)
3. └─RMSTpowerBoost (local) `<fn>`(...)
4. └─survival::basehaz(fit_cens, centered = FALSE)
5. ├─survival::survfit(fit, se.fit = FALSE)
6. └─survival:::survfit.coxph(fit, se.fit = FALSE)
7. └─survival:::model.matrix.coxph(object, data = mf)
8. └─stats::delete.response(object$terms)
9. └─stats (local) off(a$specials[[i]])
── Error ('testthat_DC.R:31:4'): DC.power.analytical returns correct structure ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::DC.power.analytical(...) at testthat_DC.R:31:4
2. └─survival::basehaz(fit_cens, centered = FALSE)
3. ├─survival::survfit(fit, se.fit = FALSE)
4. └─survival:::survfit.coxph(fit, se.fit = FALSE)
5. └─survival:::model.matrix.coxph(object, data = mf)
6. └─stats::delete.response(object$terms)
7. └─stats (local) off(a$specials[[i]])
── Error ('testthat_DC.R:53:4'): DC.ss.analytical returns correct structure ────
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─testthat::expect_no_warning(...) at testthat_DC.R:53:4
2. │ └─testthat:::expect_no_(...)
3. │ └─testthat:::quasi_capture(enquo(object), NULL, capture)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─base::withRestarts(...)
6. │ │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
7. │ │ │ └─base (local) doWithOneRestart(return(expr), restart)
8. │ │ └─base::withCallingHandlers(...)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─RMSTpowerBoost::DC.ss.analytical(...)
11. └─survival::basehaz(fit_cens, centered = FALSE)
12. ├─survival::survfit(fit, se.fit = FALSE)
13. └─survival:::survfit.coxph(fit, se.fit = FALSE)
14. └─survival:::model.matrix.coxph(object, data = mf)
15. └─stats::delete.response(object$terms)
16. └─stats (local) off(a$specials[[i]])
── Error ('testthat_DC.R:70:4'): DC.ss.analytical requires larger N for weaker effect ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─testthat::expect_no_warning(...) at testthat_DC.R:70:4
2. │ └─testthat:::expect_no_(...)
3. │ └─testthat:::quasi_capture(enquo(object), NULL, capture)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─base::withRestarts(...)
6. │ │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
7. │ │ │ └─base (local) doWithOneRestart(return(expr), restart)
8. │ │ └─base::withCallingHandlers(...)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─RMSTpowerBoost::DC.ss.analytical(...)
11. └─survival::basehaz(fit_cens, centered = FALSE)
12. ├─survival::survfit(fit, se.fit = FALSE)
13. └─survival:::survfit.coxph(fit, se.fit = FALSE)
14. └─survival:::model.matrix.coxph(object, data = mf)
15. └─stats::delete.response(object$terms)
16. └─stats (local) off(a$specials[[i]])
── Failure ('testthat_DC.R:88:4'): DC functions work correctly with no covariates ──
Expected `DC.power.analytical(...)` not to throw any errors.
Actually got a <subscriptOutOfBoundsError> with message:
subscript out of bounds
── Failure ('testthat_DC.R:96:4'): DC functions work correctly with no covariates ──
Expected `DC.ss.analytical(...)` not to throw any errors.
Actually got a <subscriptOutOfBoundsError> with message:
subscript out of bounds
── Error ('testthat_strat.R:53:4'): MS.power.analytical returns correct structure ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::MS.power.analytical(...) at testthat_strat.R:53:4
2. └─survival::basehaz(fit_cens, centered = FALSE)
3. ├─survival::survfit(fit, se.fit = FALSE)
4. └─survival:::survfit.coxph(fit, se.fit = FALSE)
5. └─survival:::model.matrix.coxph(object, data = mf)
6. └─stats::delete.response(object$terms)
7. └─stats (local) off(a$specials[[i]])
── Error ('testthat_strat.R:67:4'): MS.ss.analytical finds a plausible N ───────
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::MS.ss.analytical(...) at testthat_strat.R:67:4
2. └─survival::basehaz(fit_cens, centered = FALSE)
3. ├─survival::survfit(fit, se.fit = FALSE)
4. └─survival:::survfit.coxph(fit, se.fit = FALSE)
5. └─survival:::model.matrix.coxph(object, data = mf)
6. └─stats::delete.response(object$terms)
7. └─stats (local) off(a$specials[[i]])
── Error ('testthat_strat.R:82:4'): Analytical and Bootstrap methods give comparable results for multiplicative model ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─RMSTpowerBoost::MS.ss.analytical(...) at testthat_strat.R:82:4
2. └─survival::basehaz(fit_cens, centered = FALSE)
3. ├─survival::survfit(fit, se.fit = FALSE)
4. └─survival:::survfit.coxph(fit, se.fit = FALSE)
5. └─survival:::model.matrix.coxph(object, data = mf)
6. └─stats::delete.response(object$terms)
7. └─stats (local) off(a$specials[[i]])
[ FAIL 21 | WARN 0 | SKIP 1 | PASS 438 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc