Package check result: NOTE Check: examples, Result: NOTE Examples with CPU (user + system) or elapsed time > 5s user system elapsed contrast 6.485 0.06 6.602 Changes to worse in reverse depends: Package: rankCorr [Old version: 1.0.1, New version: 1.0.2] Check: examples New result: ERROR Running examples in ‘rankCorr-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: rankCorrCluster > ### Title: Total, between-, and within-cluster Spearman rank correlations > ### for clustered data > ### Aliases: rankCorrCluster > > ### ** Examples > > library(mvtnorm) > k <- 50; m <- 5 > sigma.u <- matrix(c(1, 0.6, 0.6, 4), ncol=2); sigma.e <- matrix(c(1, 0.6, 0.6, 1), ncol=2) > u <- rmvnorm(k, c(1, -1), sigma.u) > x1 <- matrix(NA, k, m) > y1 <- matrix(NA, k, m) > for (i in 1:k){ + r <- rmvnorm(m, c(0, 0), sigma.e) + x1[i,] <- u[i, 1] + r[, 1] + y1[i,] <- u[i, 2] + r[, 2] + } > x <- as.vector(t(x1)) > y <- as.vector(t(y1)) > cluster <- rep(1:k, each=m) > rankCorrCluster(x, y, cluster, link.x = "probit", link.y = "probit", + methods_between_corr = "approx") Error in mod$trans$cumprob(g) : attempt to apply non-function Calls: rankCorrCluster -> scores_presid Execution halted Package: riskRegression Check: examples New result: ERROR Running examples in ‘riskRegression-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: ate > ### Title: Average Treatment Effects Computation > ### Aliases: ate > > ### ** Examples > > library(survival) > library(rms) Loading required package: Hmisc Attaching package: ‘Hmisc’ The following objects are masked from ‘package:base’: format.pval, units > library(prodlim) > library(data.table) > set.seed(10) > > #### Survival settings #### > #### ATE with Cox model #### > > ## generate data > n <- 100 > dtS <- sampleData(n, outcome="survival") > dtS$time <- round(dtS$time,1) > dtS$X1 <- factor(rbinom(n, prob = c(0.3,0.4) , size = 2), labels = paste0("T",0:2)) > > ## estimate the Cox model > fit <- cph(formula = Surv(time,event)~ X1+X2,data=dtS,y=TRUE,x=TRUE) > > ## compute the ATE at times 5, 6, 7, and 8 using X1 as the treatment variable > ## standard error computed using the influence function > ## confidence intervals / p-values based on asymptotic results > ateFit1a <- ate(fit, data = dtS, treatment = "X1", times = 5:8) Input variables - Treatment : X1 (3 levels: "T0" "T1" "T2") - Event : event (cause: 1, censoring: 0) - Time [min;max] : time [0.6;15.7] - Eval. time : 5 6 7 8 number at risk T0 16 13 10 7 number at risk T1 26 21 18 11 number at risk T2 7 3 3 1 Estimation procedure - Estimator : G-formula - Uncertainty: Gaussian approximation where the variance is estimated via the influence function Processing - Prepare influence function: outcome done - Point estimation:Error in `[.data.table`(newdata, , i) : j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Calls: ate ... [ -> [.data.table -> stopf -> raise_condition -> signal Execution halted Package: riskRegression Check: tests New result: ERROR Running ‘testthat.R’ [27s/27s] 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 2023.12.21 > > test_check("riskRegression") [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 [1] "X21" "X7" "X9" [1] "X21" "X7" "X9" [1] "X21" "X7" "X9" [1] "X21" "X7" "X9" [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 [predictCoxPL] Check baseline hazard estimation vs survfit [predictCoxPL] Check argument 'diag' + iid vs predictCox [predictRisk.rfsrc] [predictRisk.CauseSpecificCox] [predictRisk.glm] vs. lava Testing binary data with Testing survival data with with formula=Hist(time,event) ~ 1 and conservative = FALSE with formula=Hist(time,event) ~ 1 and conservative = TRUE with formula=Hist(time,event) ~ X1+X2 and conservative = FALSE Testing competing.risks data with with formula=Hist(time,event) ~ 1 and conservative = FALSE with formula=Hist(time,event) ~ 1 and conservative = TRUE with formula=Hist(time,event) ~ X1+X2 and conservative = FALSE [1] "binary" [1] "survival" [1] "competing.risks" [ FAIL 10 | WARN 0 | SKIP 0 | PASS 445 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-AUC.R:14:5'): AUC censored data: order ───────────────────────── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AUC.R:14:5 2. │ └─base::withCallingHandlers(...) 3. ├─riskRegression::Score(...) 4. └─riskRegression::Score.list(...) 5. └─riskRegression:::getCensoringWeights(...) 6. ├─base::matrix(...) 7. ├─rms::survest(fit, newdata = wdata, times = times, se.fit = FALSE) 8. └─rms:::survest.cph(fit, newdata = wdata, times = times, se.fit = FALSE) 9. ├─stats::predict(fit, newdata, type = "x", expand.na = FALSE) 10. └─rms:::predict.cph(fit, newdata, type = "x", expand.na = FALSE) 11. └─rms::predictrms(...) 12. ├─newdata[, i] 13. └─data.table:::`[.data.table`(newdata, , i) 14. └─data.table:::stopf(...) 15. └─data.table:::raise_condition(...) ── Error ('test-BrierScore.R:15:5'): Brier score censored data order ─────────── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. ├─riskRegression::Score(...) at test-BrierScore.R:15:5 2. └─riskRegression::Score.list(...) 3. └─riskRegression:::getCensoringWeights(...) 4. ├─base::matrix(...) 5. ├─rms::survest(fit, newdata = wdata, times = times, se.fit = FALSE) 6. └─rms:::survest.cph(fit, newdata = wdata, times = times, se.fit = FALSE) 7. ├─stats::predict(fit, newdata, type = "x", expand.na = FALSE) 8. └─rms:::predict.cph(fit, newdata, type = "x", expand.na = FALSE) 9. └─rms::predictrms(...) 10. ├─newdata[, i] 11. └─data.table:::`[.data.table`(newdata, , i) 12. └─data.table:::stopf(...) 13. └─data.table:::raise_condition(...) ── Error ('test-predictCox.R:230:5'): [predictCox] compare survival and survival.se coxph/cph (1 fixed time) ── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. └─riskRegression::predictCox(...) at test-predictCox.R:230:5 2. ├─stats::model.matrix(object, data = newdata) 3. └─riskRegression:::model.matrix.cph(object, data = newdata) 4. ├─stats::predict(object, newdata = data, type = "x") 5. └─rms:::predict.cph(object, newdata = data, type = "x") 6. └─rms::predictrms(...) 7. ├─newdata[, i] 8. └─data.table:::`[.data.table`(newdata, , i) 9. └─data.table:::stopf(...) 10. └─data.table:::raise_condition(...) ── Error ('test-predictCox.R:303:5'): [predictCox] compare survival and survival.se coxph/cph (eventtimes) ── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. └─riskRegression::predictCox(...) at test-predictCox.R:303:5 2. ├─stats::model.matrix(object, data = newdata) 3. └─riskRegression:::model.matrix.cph(object, data = newdata) 4. ├─stats::predict(object, newdata = data, type = "x") 5. └─rms:::predict.cph(object, newdata = data, type = "x") 6. └─rms::predictrms(...) 7. ├─newdata[, i] 8. └─data.table:::`[.data.table`(newdata, , i) 9. └─data.table:::stopf(...) 10. └─data.table:::raise_condition(...) ── Error ('test-predictCox.R:531:5'): [predictCox] compare survival and survival.se to timereg/cph (categorical variable) ── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. └─riskRegression::predictCox(e.cph, newdata = dt, times = 10, se = TRUE) at test-predictCox.R:531:5 2. ├─stats::model.matrix(object, data = newdata) 3. └─riskRegression:::model.matrix.cph(object, data = newdata) 4. ├─stats::predict(object, newdata = data, type = "x") 5. └─rms:::predict.cph(object, newdata = data, type = "x") 6. └─rms::predictrms(...) 7. ├─newdata[, i] 8. └─data.table:::`[.data.table`(newdata, , i) 9. └─data.table:::stopf(...) 10. └─data.table:::raise_condition(...) ── Error ('test-predictCox.R:591:5'): [predictCox] compare survival and survival.se coxph/cph (1 fixed time, strata) ── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. └─riskRegression::predictCox(...) at test-predictCox.R:591:5 2. ├─stats::model.matrix(object, data = newdata) 3. └─riskRegression:::model.matrix.cph(object, data = newdata) 4. ├─stats::predict(object, newdata = data, type = "x") 5. └─rms:::predict.cph(object, newdata = data, type = "x") 6. └─rms::predictrms(...) 7. ├─newdata[, i] 8. └─data.table:::`[.data.table`(newdata, , i) 9. └─data.table:::stopf(...) 10. └─data.table:::raise_condition(...) ── Error ('test-predictCox.R:661:5'): [predictCox] compare survival and survival.se coxph/cph (eventtime, strata) ── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. └─riskRegression::predictCox(...) at test-predictCox.R:661:5 2. ├─stats::model.matrix(object, data = newdata) 3. └─riskRegression:::model.matrix.cph(object, data = newdata) 4. ├─stats::predict(object, newdata = data, type = "x") 5. └─rms:::predict.cph(object, newdata = data, type = "x") 6. └─rms::predictrms(...) 7. ├─newdata[, i] 8. └─data.table:::`[.data.table`(newdata, , i) 9. └─data.table:::stopf(...) 10. └─data.table:::raise_condition(...) ── Error ('test-score-train-test.R:42:9'): Testing survival data with ───────── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. ├─base::do.call(Score, input.score) at test-score-train-test.R:42:9 2. ├─riskRegression (local) ``(...) 3. └─riskRegression::Score.list(...) 4. └─riskRegression:::getCensoringWeights(...) 5. ├─rms::survest(fit, newdata = wdata, times = times, se.fit = FALSE) 6. └─rms:::survest.cph(fit, newdata = wdata, times = times, se.fit = FALSE) 7. ├─stats::predict(fit, newdata, type = "x", expand.na = FALSE) 8. └─rms:::predict.cph(fit, newdata, type = "x", expand.na = FALSE) 9. └─rms::predictrms(...) 10. ├─newdata[, i] 11. └─data.table:::`[.data.table`(newdata, , i) 12. └─data.table:::stopf(...) 13. └─data.table:::raise_condition(...) ── Error ('test-score-train-test.R:42:9'): Testing competing.risks data with ── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. ├─base::do.call(Score, input.score) at test-score-train-test.R:42:9 2. ├─riskRegression (local) ``(...) 3. └─riskRegression::Score.list(...) 4. └─riskRegression:::getCensoringWeights(...) 5. ├─rms::survest(fit, newdata = wdata, times = times, se.fit = FALSE) 6. └─rms:::survest.cph(fit, newdata = wdata, times = times, se.fit = FALSE) 7. ├─stats::predict(fit, newdata, type = "x", expand.na = FALSE) 8. └─rms:::predict.cph(fit, newdata, type = "x", expand.na = FALSE) 9. └─rms::predictrms(...) 10. ├─newdata[, i] 11. └─data.table:::`[.data.table`(newdata, , i) 12. └─data.table:::stopf(...) 13. └─data.table:::raise_condition(...) ── Error ('test-score.R:92:9'): survival outcome,Brier Score, external prediction ── Error in ``[.data.table`(newdata, , i)`: j (the 2nd argument inside [...]) is a single symbol but column name 'i' is not found. If you intended to select columns using a variable in calling scope, please try DT[, ..i]. The .. prefix conveys one-level-up similar to a file system path. Backtrace: ▆ 1. ├─riskRegression::Score(...) at test-score.R:92:9 2. └─riskRegression::Score.list(...) 3. └─riskRegression:::getCensoringWeights(...) 4. ├─base::matrix(...) 5. ├─rms::survest(fit, newdata = wdata, times = times, se.fit = FALSE) 6. └─rms:::survest.cph(fit, newdata = wdata, times = times, se.fit = FALSE) 7. ├─stats::predict(fit, newdata, type = "x", expand.na = FALSE) 8. └─rms:::predict.cph(fit, newdata, type = "x", expand.na = FALSE) 9. └─rms::predictrms(...) 10. ├─newdata[, i] 11. └─data.table:::`[.data.table`(newdata, , i) 12. └─data.table:::stopf(...) 13. └─data.table:::raise_condition(...) [ FAIL 10 | WARN 0 | SKIP 0 | PASS 445 ] Error: Test failures Execution halted