Description Usage Arguments Details Value See Also Examples
Format selected columns of a data frame for pretty viewing or printing.
1 2 3 4 5 6 7 8 9 10 |
df |
Data frame to be formatted. |
numercol |
Numeric vector, index of numeric columns to format, default, NULL, uses all numeric and integer columns. |
round2 |
Integer vector, indicating what place numbers should be rounded to, default 0. |
ndec |
Integer vector, indicating how many places to the right of
the decimal point should be displayed, default |
comma |
Character vector, indicating thousands character separator, default ",". |
characol |
Numeric vector, index of character columns to format, default, NULL, uses all character and factor columns. |
align |
Character vector, indicating justification of character columns, default "left". Other options include "right", "centre", and "none". |
keepnum |
Logical scalar, indicating if numeric columns should be kept as numeric, default TRUE, or converted to character. |
If a vector of length 1 is provided for round2
, ndec
,
comma
, or align
, the same rounding, decimals, commas, or
alignment is applied to all specified columns.
A data frame, the same dimensions as df
with selected columns
rounded and/or formatted and converted to character.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.