decimal_align {formatters} | R Documentation |
Decimal alignment
Description
Aligning decimal values of string matrix. Allowed alignments are: dec_left
, dec_right
,
and decimal
.
Usage
decimal_align(string_mat, align_mat)
Arguments
string_mat |
( |
align_mat |
( |
Details
Left and right decimal alignment (dec_left
and dec_right
) differ from center decimal
alignment (decimal
) only when there is padding present. This may occur if column widths are
set wider via parameters widths
in toString
or colwidths
in paginate_*
. More commonly,
it also occurs when column names are wider. Cell wrapping is not supported when decimal
alignment is used.
Value
A processed string matrix of class MatrixPrintForm
with decimal-aligned values.
See Also
Examples
dfmf <- basic_matrix_form(mtcars[1:5, ])
aligns <- mf_aligns(dfmf)
aligns[, -c(1)] <- "dec_left"
decimal_align(mf_strings(dfmf), aligns)