diff --git a/DESCRIPTION b/DESCRIPTION index 6498443c95..95d43fc967 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -66,6 +66,8 @@ Suggests: svglite (>= 2.1.2), testthat (>= 3.1.9), withr (>= 2.0.0) +Remotes: + insightsengineering/rtables@main VignetteBuilder: knitr, rmarkdown diff --git a/NEWS.md b/NEWS.md index add6943aff..96a70da495 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # tern 0.9.8.9002 +### Enhancements +* Code enhancement in `tabulate_rsp_subgroups` and `tabulate_survival_subgroups`, adding `parent_name` when using `split_rows_by` and `analysis` on the same variable multiple times, enhancing the table paths. Upstream enhancement from `rtables`. + ### Bug Fixes * Fixed bug in `g_lineplot()` where `table_format` and `table_labels` arguments were ignored. * Fixed bug in `g_lineplot()` not being able to take a function as a format for table stats. diff --git a/R/response_subgroups.R b/R/response_subgroups.R index 600ce155d2..e82b8a471a 100644 --- a/R/response_subgroups.R +++ b/R/response_subgroups.R @@ -354,7 +354,8 @@ tabulate_rsp_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("content"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "All Patients" ) lyt_prop <- analyze_colvars( lyt = lyt_prop, @@ -370,7 +371,8 @@ tabulate_rsp_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("analysis"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "analysis rows" ) lyt_prop <- split_rows_by(lyt = lyt_prop, var = "var_label", nested = TRUE) lyt_prop <- analyze_colvars( @@ -401,7 +403,8 @@ tabulate_rsp_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("content"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "All Patients" ) lyt_or <- analyze_colvars( lyt = lyt_or, @@ -418,7 +421,8 @@ tabulate_rsp_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("analysis"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "analysis rows" ) lyt_or <- split_rows_by(lyt = lyt_or, var = "var_label", nested = TRUE) lyt_or <- analyze_colvars( diff --git a/R/survival_duration_subgroups.R b/R/survival_duration_subgroups.R index 4606e03c7f..47ba75ffbd 100644 --- a/R/survival_duration_subgroups.R +++ b/R/survival_duration_subgroups.R @@ -360,7 +360,8 @@ tabulate_survival_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("content"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "All Patients" ) lyt_survtime <- analyze_colvars( lyt = lyt_survtime, @@ -376,7 +377,8 @@ tabulate_survival_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("analysis"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "analysis rows" ) lyt_survtime <- split_rows_by(lyt = lyt_survtime, var = "var_label", nested = TRUE) lyt_survtime <- analyze_colvars( @@ -407,7 +409,8 @@ tabulate_survival_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("content"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "All patient row" ) lyt_hr <- analyze_colvars( lyt = lyt_hr, @@ -424,7 +427,8 @@ tabulate_survival_subgroups <- function(lyt, var = "row_type", split_fun = keep_split_levels("analysis"), nested = FALSE, - child_labels = "hidden" + child_labels = "hidden", + parent_name = "analysis rows" ) lyt_hr <- split_rows_by(lyt = lyt_hr, var = "var_label", nested = TRUE) lyt_hr <- analyze_colvars(