Skip to content

Fix indentation in functions that use matrix_form #1239

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 10 commits into from
May 10, 2024
2 changes: 1 addition & 1 deletion R/g_forest.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ g_forest <- function(tbl,
checkmate::assert_true(is.null(col) | length(col) == 1 | length(col) == nrow(tbl))

# Extract info from table
mat <- matrix_form(tbl)
mat <- matrix_form(tbl, indent_rownames = TRUE)
mat_strings <- formatters::mf_strings(mat)
nlines_hdr <- formatters::mf_nlheader(mat)
nrows_body <- nrow(mat_strings) - nlines_hdr
Expand Down
2 changes: 1 addition & 1 deletion R/utils_ggplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#'
#' @export
rtable2gg <- function(tbl, fontsize = 12, colwidths = NULL, lbl_col_padding = 0) {
mat <- rtables::matrix_form(tbl)
mat <- rtables::matrix_form(tbl, indent_rownames = TRUE)
mat_strings <- formatters::mf_strings(mat)
mat_aligns <- formatters::mf_aligns(mat)
mat_indent <- formatters::mf_rinfo(mat)$indent
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/_snaps/g_forest/g_forest.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions tests/testthat/_snaps/g_forest/g_forest_or.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions tests/testthat/_snaps/g_forest/g_forest_table_only.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading