From ca83046a93c1aeb69810b23567ca5456101bdece Mon Sep 17 00:00:00 2001 From: Melkiades Date: Sun, 15 Oct 2023 18:36:16 +0200 Subject: [PATCH] fix --- R/matrix_form.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/matrix_form.R b/R/matrix_form.R index 767c91976..24718f977 100644 --- a/R/matrix_form.R +++ b/R/matrix_form.R @@ -24,13 +24,16 @@ mform_handle_newlines <- function(matform) { # Header indices hdr_inds <- 1:nr_header + # Padder should be bottom aligned if no topleft (case of rlistings) + tl_padder <- ifelse(has_topleft, pad_vert_top, pad_vert_bottom) + ## used below even though we don't store it on the resulting object new_nlines_hdr <- sum(row_nlines[hdr_inds]) newstrmat <- rbind( cbind( expand_mat_rows(strmat[hdr_inds, 1, drop = FALSE], row_nlines[hdr_inds], - cpadder = pad_vert_top # topleft info is top aligned + cpadder = tl_padder # topleft info is top aligned ), expand_mat_rows(strmat[hdr_inds, -1, drop = FALSE], row_nlines[hdr_inds], @@ -206,7 +209,6 @@ MatrixPrintForm <- function(strings = NULL, indent_size = 2) { display <- disp_from_spans(spans) - ncs <- if (has_rowlabs) ncol(strings) - 1 else ncol(strings) ret <- structure( list(