Skip to content

alter var_labels #1423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Suggests:
svglite (>= 2.1.2),
testthat (>= 3.1.9),
withr (>= 2.0.0)
Remotes:
insightsengineering/rtables@main
VignetteBuilder:
knitr,
rmarkdown
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 8 additions & 4 deletions R/response_subgroups.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down Expand Up @@ -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,
Expand All @@ -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(
Expand Down
12 changes: 8 additions & 4 deletions R/survival_duration_subgroups.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down Expand Up @@ -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,
Expand All @@ -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(
Expand Down
Loading