From 2fa96a8d28c9deba4c67c17b281d4161d8c41a11 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 15 Apr 2024 23:03:33 +0800 Subject: [PATCH 1/2] update description and news, [skip vbump] (#857) * update description and news, [skip vbump] * formatters to 0.5.6 * [skip roxygen] [skip vbump] Roxygen Man Pages Auto Update * Empty-Commit --------- Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> --- DESCRIPTION | 6 +++--- NEWS.md | 2 +- man/formatters_methods.Rd | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5195fa7b6..bf1532137 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rtables Title: Reporting Tables -Version: 0.6.6.9011 -Date: 2024-02-23 +Version: 0.6.7 +Date: 2024-04-15 Authors@R: c( person("Gabriel", "Becker", , "gabembecker@gmail.com", role = "aut", comment = "Original creator of the package"), @@ -29,7 +29,7 @@ URL: https://github.com/insightsengineering/rtables, https://insightsengineering.github.io/rtables/ BugReports: https://github.com/insightsengineering/rtables/issues Depends: - formatters (>= 0.5.5.9005), + formatters (>= 0.5.6), magrittr (>= 1.5), methods, R (>= 2.10) diff --git a/NEWS.md b/NEWS.md index 32f6a2269..6e8ccdf3b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -## rtables 0.6.6.9011 +## rtables 0.6.7 ### New Features * Added `top_level_section_div` for `basic_table` to set section dividers for top level rows. * Added `keep_label_rows` to `as_result_df` to have these lines visible. diff --git a/man/formatters_methods.Rd b/man/formatters_methods.Rd index d2ffe1ef9..c50ac3c5c 100644 --- a/man/formatters_methods.Rd +++ b/man/formatters_methods.Rd @@ -233,3 +233,8 @@ The technically present root tree node is excluded from the summary returned by both \code{make_row_df} and \code{make_col_df} (see \code{\link[rtables:make_col_df]{rtables::make_col_df()}}), as it is simply the row/column structure of \code{tt} and thus not useful for pathing or pagination. } +\examples{ +# Expected error with matrix_form. For real case examples consult {rtables} documentation +mf <- basic_matrix_form(iris) +# make_row_df(mf) # Use table obj instead +} From b16e0be75f7d5c2dac98bd5e8c1ef4256b47b0cc Mon Sep 17 00:00:00 2001 From: Emily de la Rua <59304861+edelarua@users.noreply.github.com> Date: Sat, 20 Apr 2024 11:36:16 -0400 Subject: [PATCH 2/2] Fix bug removing indentation in `as_html` (#862) --- NEWS.md | 1 + R/as_html.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 6e8ccdf3b..854eda8e5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,7 @@ * Fixed `sort_at_path` pathing to ignore leading `"root"` element (regardless of actual root element name) to match current `tt_at_path` behavior. * Fixed `section_div` for analysis of multiple variables (`AnalyzeMultiVars`). * Fixed mismatch between indentation declared in row info (`mf_rinfo(mf)`) and actual selected indentation from `matrix_form(mf, indent_rownames = FALSE)`. + * Fixed bug in `as_html` preventing indentation from being applied in `Viewer` output. ### Miscellaneous * Removed deprecated functions `add_analyzed_var` and `trim_zero_rows`. diff --git a/R/as_html.R b/R/as_html.R index 16ee1daab..ffb9705d2 100644 --- a/R/as_html.R +++ b/R/as_html.R @@ -76,7 +76,7 @@ as_html <- function(x, stopifnot(is(x, "VTableTree")) - mat <- matrix_form(x) + mat <- matrix_form(x, indent_rownames = TRUE) nlh <- mf_nlheader(mat) nc <- ncol(x) + 1