Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkiades committed Oct 15, 2023
1 parent 3ab6d50 commit ca83046
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/matrix_form.R
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ca83046

Please sign in to comment.