CRAN Package Check Results for Package riskRegression

Last updated on 2025-12-19 14:50:33 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2025.09.17 200.73 339.92 540.65 OK
r-devel-linux-x86_64-debian-gcc 2025.09.17 129.61 223.46 353.07 OK
r-devel-linux-x86_64-fedora-clang 2025.09.17 424.00 536.88 960.88 OK
r-devel-linux-x86_64-fedora-gcc 2025.09.17 378.00 423.64 801.64 ERROR
r-devel-windows-x86_64 2025.09.17 223.00 343.00 566.00 OK
r-patched-linux-x86_64 2025.09.17 193.55 310.26 503.81 OK
r-release-linux-x86_64 2025.09.17 199.02 308.84 507.86 OK
r-release-macos-arm64 2025.09.17 OK
r-release-macos-x86_64 2025.09.17 125.00 270.00 395.00 OK
r-release-windows-x86_64 2025.09.17 231.00 326.00 557.00 OK
r-oldrel-macos-arm64 2025.09.17 NOTE
r-oldrel-macos-x86_64 2025.09.17 119.00 267.00 386.00 NOTE
r-oldrel-windows-x86_64 2025.09.17 277.00 433.00 710.00 OK

Check Details

Version: 2025.09.17
Check: examples
Result: ERROR Running examples in ‘riskRegression-Ex.R’ failed The error most likely occurred in: > ### Name: IPA > ### Title: Explained variation for settings with binary, survival and > ### competing risk outcome > ### Aliases: IPA rsquared rsquared.default rsquared.glm rsquared.coxph > ### rsquared.CauseSpecificCox IPA.default IPA.glm IPA.coxph > ### IPA.CauseSpecificCox > > ### ** Examples > > library(prodlim) > library(data.table) Attaching package: ‘data.table’ The following object is masked from ‘package:base’: %notin% > # binary outcome > library(lava) > set.seed(18) > learndat <- sampleData(48,outcome="binary") > lr1 = glm(Y~X1+X2+X7+X9,data=learndat,family=binomial) > IPA(lr1) Variable Brier IPA IPA.drop <fctr> <char> <char> <char> 1: Null model 24.8 0.0 37.1 2: Full model 15.6 37.1 0.0 3: X1 19.5 21.6 15.5 4: X2 15.8 36.3 0.8 5: X7 16.0 35.4 1.7 6: X9 21.2 14.6 22.5 NOTE: Values are multiplied by 100 and given in %. NOTE: The higher IPA the better. NOTE: IPA.drop = IPA(Full model) - IPA. The higher the drop the more important is the variable for the full model. > > ## validation data > valdat=sampleData(94,outcome="binary") > IPA(lr1,newdata=valdat) Variable Brier IPA IPA.drop <fctr> <char> <char> <char> 1: Null model 23.6 0.0 -1.3 2: Full model 23.9 -1.3 0.0 3: X1 23.9 -0.9 -0.3 4: X2 23.2 1.9 -3.1 5: X7 24.0 -1.7 0.4 6: X9 23.5 0.5 -1.8 NOTE: Values are multiplied by 100 and given in %. NOTE: The higher IPA the better. NOTE: IPA.drop = IPA(Full model) - IPA. The higher the drop the more important is the variable for the full model. > > ## predicted risks externally given > p1=predictRisk(lr1,newdata=valdat) > IPA(p1,formula=Y~1,valdat) model IPA Brier <fctr> <char> <char> 1: Null model 0.0 23.6 2: numeric -1.3 23.9 NOTE: Values are multiplied by 100 and given in %. NOTE: The higher IPA the better. NOTE: IPA.drop = IPA(Full model) - IPA. The higher the drop the more important is the variable for the full model. > > # survival > library(survival) > data(pbc) > pbc=na.omit(pbc) > pbctest=(1:NROW(pbc)) %in% sample(1:NROW(pbc),size=.632*NROW(pbc)) > pbclearn=pbc[pbctest,] > cox1= coxph(Surv(time,status!=0)~age+sex+log(bili)+log(albumin)+log(protime), + data=pbclearn,x=TRUE) > > ## same data > IPA(cox1,formula=Surv(time,status!=0)~1,times=1000) Error in `[.data.table`(score, , `:=`(IPA, 1 - Brier/Brier[model == "Null model"]), : attempt access index 3/3 in VECTOR_ELT Calls: IPA ... computePerformance -> IPACompute -> [ -> [.data.table Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 2025.09.17
Check: tests
Result: ERROR Running ‘testthat.R’ [57s/80s] 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/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(riskRegression) riskRegression version 2025.09.17 > > test_check("riskRegression") Saving _problems/test-AUC-13.R Saving _problems/test-BrierScore-14.R [iidCox] internal consistency [iidCox] compare to timereg - no strata, no interaction, continuous [iidCox] compare to timereg - no strata, interaction, continuous [iidCox] compare to timereg - no covariate [iidCox] compare to timereg - no strata, no interaction, categorical [iidCox] compare to timereg - ties [iidCox] compare to timereg - strata [iidCox] compare to timereg - Melanoma [predictCox] Estimation of the baseline hazard (no strata) [predictCox] Estimation of the baseline hazard (strata) [predictCox] Estimation of the baseline hazard (time varying cov, no strata) [predictCox] Estimation of the baseline hazard (time varying cov, strata) [predictCox] Predictions (no strata, continuous) [predictCox] Predictions (no strata, categorical) [predictCox] Predictions (strata) [predictCox] SE/CI check against manual computation [predictCox] Argument 'diag' [predictCox] Confidence band vs timereg [predictCox] Check same result store.iid=minimal vs. full [predictCox] Does not handle weights [predictCox] dealing with negative timepoints or NA [predictCox] Previous bug [predictRisk.rfsrc] [predictRisk.CauseSpecificCox] [predictRisk.glm] vs. lava Saving _problems/test-score-train-test-42.R Saving _problems/test-score-train-test-42.R Saving _problems/test-score-38.R Saving _problems/test-score-92.R Saving _problems/test-score-119.R Saving _problems/test-score-149.R [1] "binary" [1] "survival" Saving _problems/test-summary-score-44.R [ FAIL 9 | WARN 0 | SKIP 0 | PASS 371 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-AUC.R:13:5'): AUC censored data: order ───────────────────────── Error in ``[.data.table`(aucDT, , `:=`(TPR, cumsum(ipcwCases)/sum(ipcwCases)), by = list(model, times))`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AUC.R:13:5 2. │ └─base::withCallingHandlers(...) 3. ├─riskRegression::Score(...) 4. └─riskRegression::Score.list(...) 5. └─riskRegression:::computePerformance(...) 6. ├─base::do.call(paste(m, response.type, sep = "."), input) 7. └─riskRegression:::AUC.survival(...) 8. ├─...[] 9. └─data.table:::`[.data.table`(...) ── Error ('test-BrierScore.R:14:5'): Brier score censored data order ─────────── Error in ``[.data.table`(DT, , `:=`(IC0, residuals - mean(residuals)), by = list(model, times))`: attempt access index 10/10 in VECTOR_ELT Backtrace: ▆ 1. ├─riskRegression::Score(...) at test-BrierScore.R:14:5 2. └─riskRegression::Score.list(...) 3. └─riskRegression:::computePerformance(...) 4. ├─base::do.call(paste(m, response.type, sep = "."), input) 5. └─riskRegression:::Brier.survival(...) 6. ├─...[] 7. └─data.table:::`[.data.table`(...) ── Error ('test-score-train-test.R:42:7'): Survival outcome ──────────────────── Error in ``[.data.table`(DT, , `:=`(IC0, residuals - mean(residuals)), by = list(model, times))`: attempt access index 10/10 in VECTOR_ELT Backtrace: ▆ 1. ├─base::do.call(Score, input.score) at test-score-train-test.R:42:7 2. ├─riskRegression (local) `<fn>`(...) 3. └─riskRegression::Score.list(...) 4. └─riskRegression:::computePerformance(...) 5. ├─base::do.call(paste(m, response.type, sep = "."), input) 6. └─riskRegression:::Brier.survival(...) 7. ├─...[] 8. └─data.table:::`[.data.table`(...) ── Error ('test-score-train-test.R:42:7'): Competing risks outcome ───────────── Error in ``[.data.table`(DT, , `:=`(IC0, residuals - mean(residuals)), by = list(model, times))`: attempt access index 11/11 in VECTOR_ELT Backtrace: ▆ 1. ├─base::do.call(Score, input.score) at test-score-train-test.R:42:7 2. ├─riskRegression (local) `<fn>`(...) 3. └─riskRegression::Score.list(...) 4. └─riskRegression:::computePerformance(...) 5. ├─base::do.call(paste(m, response.type, sep = "."), input) 6. └─riskRegression:::Brier.competing.risks(...) 7. ├─...[] 8. └─data.table:::`[.data.table`(...) ── Error ('test-score.R:38:3'): R squared/IPA ────────────────────────────────── Error in ``[.data.table`(DT, , `:=`(Brier, sum(residuals)/N), by = list(model))`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─riskRegression::Score(...) at test-score.R:38:3 2. └─riskRegression::Score.list(...) 3. └─riskRegression:::computePerformance(...) 4. ├─base::do.call(paste(m, response.type, sep = "."), input) 5. └─riskRegression:::Brier.binary(...) 6. ├─DT[, `:=`(Brier, sum(residuals)/N), by = list(model)] 7. └─data.table:::`[.data.table`(...) ── Error ('test-score.R:92:9'): survival outcome,Brier Score, external prediction ── Error in ``[.data.table`(aucDT, , `:=`(TPR, cumsum(ipcwCases)/sum(ipcwCases)), by = list(model, times))`: attempt access index 13/13 in VECTOR_ELT Backtrace: ▆ 1. ├─riskRegression::Score(...) at test-score.R:92:9 2. └─riskRegression::Score.list(...) 3. └─riskRegression:::computePerformance(...) 4. ├─base::do.call(paste(m, response.type, sep = "."), input) 5. └─riskRegression:::AUC.survival(...) 6. ├─...[] 7. └─data.table:::`[.data.table`(...) ── Error ('test-score.R:115:9'): integrated Brier score ──────────────────────── Error in ``[.data.table`(aucDT, , `:=`(TPR, cumsum(ipcwCases)/sum(ipcwCases)), by = list(model, times))`: attempt access index 13/13 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-score.R:115:9 2. │ └─base::withCallingHandlers(...) 3. ├─riskRegression::Score(...) 4. └─riskRegression::Score.list(...) 5. └─riskRegression:::computePerformance(...) 6. ├─base::do.call(paste(m, response.type, sep = "."), input) 7. └─riskRegression:::AUC.survival(...) 8. ├─...[] 9. └─data.table:::`[.data.table`(...) ── Error ('test-score.R:149:9'): survival outcome uncensored ─────────────────── Error in ``[.data.table`(out[["Brier"]][["score"]], , `:=`(IBS, sapply(times, function(t) { Dint(x = c(0, times), y = c(0, Brier), range = c(0, t)) })), by = c("model"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─riskRegression::Score(...) at test-score.R:149:9 2. └─riskRegression::Score.list(...) 3. └─riskRegression:::computePerformance(...) 4. ├─...[] 5. └─data.table:::`[.data.table`(...) ── Error ('test-summary-score.R:44:5'): (code run outside of `test_that()`) ──── Error in ``[.data.table`(DT, , `:=`(IC0, residuals - mean(residuals)), by = list(model, times))`: attempt access index 10/10 in VECTOR_ELT Backtrace: ▆ 1. ├─riskRegression::Score(...) at test-summary-score.R:44:5 2. └─riskRegression::Score.list(...) 3. └─riskRegression:::computePerformance(...) 4. ├─base::do.call(paste(m, response.type, sep = "."), input) 5. └─riskRegression:::Brier.survival(...) 6. ├─...[] 7. └─data.table:::`[.data.table`(...) [ FAIL 9 | WARN 0 | SKIP 0 | PASS 371 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 2025.09.17
Check: installed package size
Result: NOTE installed size is 12.0Mb sub-directories of 1Mb or more: R 2.0Mb libs 9.4Mb Flavors: r-oldrel-macos-arm64, r-oldrel-macos-x86_64