
Aligning decimal values of string matrix. Allowed alignments are: dec_left
, dec_right
,
and decimal
.
decimal_align(string_mat, align_mat)
A processed string matrix of class MatrixPrintForm
with decimal-aligned values.
(character matrix
)
"string" matrix component of MatrixPrintForm
object.
(character matrix
)
"aligns" matrix component of MatrixPrintForm
object.
Should contain either dec_left
, dec_right
, or decimal
for values to be decimal aligned.
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.
toString()
, MatrixPrintForm()
dfmf <- basic_matrix_form(mtcars[1:5, ])
aligns <- mf_aligns(dfmf)
aligns[, -c(1)] <- "dec_left"
decimal_align(mf_strings(dfmf), aligns)
Run the code above in your browser using DataLab