* using log directory ‘/data/localhost/ripley/R/packages/tests-donttest/crane.Rcheck’ * using R Under development (unstable) (2026-08-24 r90445) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 16.1.1 20260515 (Red Hat 16.1.1-2) GNU Fortran (GCC) 16.1.1 20260515 (Red Hat 16.1.1-2) * running under: Fedora Linux 44 (Server Edition) * using session charset: UTF-8 * current time: 2026-08-25 01:07:31 UTC * checking for file ‘crane/DESCRIPTION’ ... OK * this is package ‘crane’ version ‘0.3.2’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘crane’ can be installed ... [11s/15s] OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [18s/24s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... [72s/117s] OK * checking examples with --run-donttest ... [80s/96s] ERROR Running examples in ‘crane-Ex.R’ failed The error most likely occurred in: > ### Name: tbl_roche_subgroups > ### Title: Subgroup Analyses > ### Aliases: tbl_roche_subgroups > > ### ** Examples > > ## Don't show: > if (identical(Sys.getenv("NOT_CRAN"), "true")) withAutoprint({ # examplesIf + ## End(Don't show) + set.seed(1) + + # prepare sample data + df_adtte <- data.frame( + time = rexp(100, rate = 0.1), + status = sample(c(0, 1), 100, replace = TRUE), + arm = sample(c("Arm A", "Arm B"), 100, replace = TRUE), + grade = sample(c("I", "II"), 100, replace = TRUE), + strata = sample(c("1", "2"), 100, replace = TRUE) + ) |> + mutate(arm = relevel(factor(arm), ref = "Arm A")) # Set Reference + + # logistic regression ------------------------------------------------------- + df_adtte |> + tbl_roche_subgroups( + rsp = "status", + by = "arm", + subgroups = c("grade"), + .tbl_fun = + ~ glm(status ~ arm, data = .x) |> + tbl_regression( + show_single_row = arm, + exponentiate = TRUE # , tidy_fun = broom.helpers::tidy_parameters + ) + ) |> + modify_header(starts_with("estimate") ~ "**Odds Ratio**") + ## Don't show: + }) # examplesIf > ## End(Don't show) > ## Don't show: > if (rlang::is_installed("survival")) withAutoprint({ # examplesIf + ## End(Don't show) + # coxph regression ---------------------------------------------------------- + # please use browser() inside .tbl_fun to check if the coxph model throws an error + # and use tryCatch to modify the input/output accordingly + ## No test: + df_adtte |> + tbl_roche_subgroups( + rsp = status, + by = arm, + time_to_event = time, # Specify time variable for time-to-event analyses (different mid table) + subgroups = c(grade, strata), + ~ survival::coxph( # Please use coxph for time-to-event analyses + survival::Surv(time, status) ~ arm, + data = .x, + ties = "exact" + ) |> # Exact Ties + tbl_regression( + show_single_row = arm, + exponentiate = TRUE # Get Hazard Ratios + ) + ) |> + modify_header(starts_with("estimate") ~ "**Hazard Ratio**") + ## End(No test) + ## Don't show: + }) # examplesIf > modify_header(tbl_roche_subgroups(df_adtte, rsp = status, by = arm, time_to_event = time, + subgroups = c(grade, strata), ~tbl_regression(survival::coxph(survival::Surv(time, + status) ~ arm, data = .x, ties = "exact"), show_single_row = arm, exponentiate = TRUE)), + starts_with("estimate") ~ "**Hazard Ratio**") Error in eval(ei, envir) : object 'df_adtte' not found Calls: withAutoprint ... tbl_roche_subgroups -> check_data_frame -> check_class Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [234s/138s] [235s/138s] OK * checking PDF version of manual ... [6s/10s] OK * checking HTML version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR See ‘/data/localhost/ripley/R/packages/tests-donttest/crane.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 8:40.52, 473.44 + 30.30