tbl_markdown | R Documentation |
Prints a data.frame as Markdown, LaTeX or HTML using knitr::kable()
, with bold headers and Dutch number formats.
tbl_markdown(
x,
row.names = rownames(x),
column.names = colnames(x),
align = NULL,
padding = 2,
caption = "",
na = "",
type = "markdown",
format.dates = "dd-mm-yyyy",
decimal.mark = dec_mark(),
big.mark = big_mark(),
logicals = c("X", ""),
columns.percent = NA,
column.names.bold = TRUE,
round.numbers = 2,
round.percent = 1,
newlines.leading = 0,
newlines.trailing = 2,
print = TRUE
)
x |
a data.frame or a |
row.names |
row names to be displayed |
column.names |
column names to be displayed |
align |
alignment of columns (default: numbers to the right, others to the left) |
padding |
extra cell padding |
caption |
caption of table |
na |
text for missing values (default: |
type |
type of formatting the table - valid options are |
format.dates |
formatting of dates, will be evaluated with |
decimal.mark |
decimal separator, defaults to |
big.mark |
thousands separator, defaults to |
logicals |
vector with two values that replace |
columns.percent |
display the column indices as percentages using |
column.names.bold |
display column names in bold |
round.numbers |
number of decimal places to round up for numbers |
round.percent |
number of decimal places to round to when using |
newlines.leading |
number of white lines to print before the table |
newlines.trailing |
number of white lines to print after the table |
print |
only useful when input is a Flextable: force printing |
When in an R Markdown rapport a table is printed using this function, column headers only print well if newlines.leading
>= 2, or by manually using cat("\\n\\n")
before printing the table.
character
knitr::kable()
tbl_markdown(mtcars[1:6, 1:6], padding = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.