CRAN Package Check Results for Package phers

Last updated on 2026-10-24 15:51:37 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0.5 10.42 88.00 98.42 OK
r-devel-linux-x86_64-debian-gcc 1.0.5 8.33 59.22 67.55 ERROR
r-devel-linux-x86_64-fedora-clang 1.0.5 10.00 81.14 91.14 OK
r-devel-linux-x86_64-fedora-gcc 1.0.5 64.67 OK
r-devel-windows-x86_64 1.0.5 12.00 100.00 112.00 OK
r-patched-linux-x86_64 1.0.5 10.23 76.09 86.32 OK
r-release-linux-x86_64 1.0.5 10.50 76.32 86.82 OK
r-release-macos-arm64 1.0.5 3.00 23.00 26.00 OK
r-release-macos-x86_64 1.0.5 9.00 82.00 91.00 OK
r-release-windows-x86_64 1.0.5 12.00 90.00 102.00 OK
r-oldrel-macos-arm64 1.0.5 3.00 23.00 26.00 OK
r-oldrel-macos-x86_64 1.0.5 8.00 142.00 150.00 OK
r-oldrel-windows-x86_64 1.0.5 16.00 111.00 127.00 OK

Check Details

Version: 1.0.5
Check: examples
Result: ERROR Running examples in ‘phers-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: getWeights > ### Title: Calculate phecode-specific weights for phenotype risk scores > ### Aliases: getWeights > > ### ** Examples > > library('data.table') Attaching package: ‘data.table’ The following object is masked from ‘package:base’: %notin% > library('survival') > setDTthreads(1) # default for examples > > # map ICD codes to phecodes > phecodeOccurrences = getPhecodeOccurrences(icdSample) > > # calculate weights using the prevalence method > weightsPrev = getWeights(demoSample, phecodeOccurrences) > > # calculate weights using the prevalence method > # (assign negative weights to those with zero phecode occurrence) > weightsPrevNeg = getWeights( + demoSample, phecodeOccurrences, negativeWeights = TRUE) > > # calculate weights using the logistic method > weightsLogistic = getWeights( + demoSample, phecodeOccurrences, method = 'logistic', methodFormula = ~ sex) > > # calculate weights using the loglinear method > phecodeOccurrences2 = phecodeOccurrences[, .( + num_occurrences = uniqueN(entry_date)), by = .(person_id, phecode)] > weightsLoglinear = getWeights( + demoSample, phecodeOccurrences2, method = 'loglinear', methodFormula = ~ sex) > > # calculate weights using the cox method > phecodeOccurrences3 = phecodeOccurrences[, .( + first_occurrence_date = min(entry_date)) , by = .(person_id, phecode)] > phecodeOccurrences3 = merge( + phecodeOccurrences3, demoSample[, .(person_id, dob)], by = 'person_id') > phecodeOccurrences3[, + occurrence_age := as.numeric((first_occurrence_date - dob)/365.25)] > phecodeOccurrences3[, `:=`(first_occurrence_date = NULL, dob = NULL)] > demoSample3 = demoSample[, .( + person_id, sex, + first_age = as.numeric((first_visit_date - dob)/365.25), + last_age = as.numeric((last_visit_date - dob)/365.25))] > weightsCox = getWeights( + demoSample3, phecodeOccurrences3, method = 'cox', methodFormula = ~ sex) Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, : Ran out of iterations and did not converge Error in { : task 1 failed - "subscript out of bounds" Calls: getWeights -> getWeightsFunc -> doOp -> <Anonymous> Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.0.5
Check: tests
Result: ERROR Running ‘testthat.R’ [3s/4s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(phers) > > test_check('phers') Attaching package: 'data.table' The following object is masked from 'package:base': %notin% Extracting number of samples and rownames from geno_test.fam... Extracting number of variants and colnames from geno_test.bim... Saving _problems/test_weights-50.R Saving _problems/test_weights-59.R [ FAIL 2 | WARN 0 | SKIP 0 | PASS 23 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_weights.R:48:3'): getWeights output (cox model) ──────────────── Error in `{ pheSub = unique(phecodeOccurrences[phecode == phe, .(person_id, phecode, occurrence_age)]) coxInput = merge(demos, pheSub, by = "person_id", all.x = TRUE) coxInput[!is.na(phecode), `:=`(dx_status = 1, age2 = occurrence_age)] coxInput[is.na(phecode), `:=`(dx_status = 0, age2 = last_age)] coxInput[, `:=`(phecode, phe)] coxInput[, `:=`(last_age = NULL, occurrence_age = NULL)] coxInput[age2 == first_age, `:=`(age2, age2 + (1/365.25))] coxInput = coxInput[age2 > first_age] methodFormula = update.formula(methodFormula, Surv(first_age, age2, dx_status) ~ .) fit = coxph(methodFormula, data = coxInput, model = TRUE) coxInput[, `:=`(pred, 1 - exp(-predict(fit, newdata = .SD, type = "expected", se.fit = FALSE)))] coxInput = coxInput[, .(person_id, phecode, pred, dx_status)] }`: task 1 failed - "subscript out of bounds" Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test_weights.R:48:3 2. │ └─base::withCallingHandlers(...) 3. └─phers::getWeights(...) 4. └─phers (local) getWeightsFunc(...) 5. └─foreach (local) doOp(...) 6. └─e$fun(obj, substitute(ex), parent.frame(), e$data) ── Error ('test_weights.R:57:3'): getWeights output (cox model, negative weights) ── Error in `{ pheSub = unique(phecodeOccurrences[phecode == phe, .(person_id, phecode, occurrence_age)]) coxInput = merge(demos, pheSub, by = "person_id", all.x = TRUE) coxInput[!is.na(phecode), `:=`(dx_status = 1, age2 = occurrence_age)] coxInput[is.na(phecode), `:=`(dx_status = 0, age2 = last_age)] coxInput[, `:=`(phecode, phe)] coxInput[, `:=`(last_age = NULL, occurrence_age = NULL)] coxInput[age2 == first_age, `:=`(age2, age2 + (1/365.25))] coxInput = coxInput[age2 > first_age] methodFormula = update.formula(methodFormula, Surv(first_age, age2, dx_status) ~ .) fit = coxph(methodFormula, data = coxInput, model = TRUE) coxInput[, `:=`(pred, 1 - exp(-predict(fit, newdata = .SD, type = "expected", se.fit = FALSE)))] coxInput = coxInput[, .(person_id, phecode, pred, dx_status)] }`: task 1 failed - "subscript out of bounds" Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test_weights.R:57:3 2. │ └─base::withCallingHandlers(...) 3. └─phers::getWeights(...) 4. └─phers (local) getWeightsFunc(...) 5. └─foreach (local) doOp(...) 6. └─e$fun(obj, substitute(ex), parent.frame(), e$data) [ FAIL 2 | WARN 0 | SKIP 0 | PASS 23 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-gcc