MatrixPrintForm of an objectRow names are also considered a column for the output.
propose_column_widths(
x,
indent_size = 2,
fontspec = font_spec(),
round_type = obj_round_type(x)
)A vector of column widths based on the content of x for use in printing and pagination.
(ANY)
a MatrixPrintForm object, or an object with a matrix_form method.
(numeric(1))
indent size, in characters. Ignored when x is already
a MatrixPrintForm object in favor of information there.
(font_spec)
a font_spec object specifying the font information to use for
calculating string widths and heights, as returned by font_spec().
(string)
.
The type of rounding to perform. Allowed values: ("iec", "iec_mod" or "sas")
iec, the default, and iec_mod performs rounding compliant with IEC 60559
(see notes in round_fmt()), while
sas performs nearest-value rounding consistent with rounding within SAS.
In addition, the rounding of a negative number that rounds to zero will be presented as 0
(with the appropriate number of trailing zeros) for both sas and iec_mod,
while for iec, it will be presented as -0 (with the appropriate number of trailing zeros).
mf <- basic_matrix_form(mtcars)
propose_column_widths(mf)
Run the code above in your browser using DataLab