md_table | R Documentation |
A minimal Markdown table generator using the pipe |
as column separators.
md_table(x, digits = NULL, na = NULL, newline = NULL, limit = NULL)
x |
A 2-dimensional object (e.g., a matrix or data frame). |
digits |
The number of decimal places to be passed to |
na |
A character string to represent |
newline |
A character string to substitute |
limit |
The maximum number of rows to show in the table. If it is smaller than the number of rows, the data in the middle will be omitted. If it is of length 2, the second number will be used to limit the number of columns. Zero and negative values are ignored. |
The default argument values can be set via global options with the prefix
xfun.md_table.
, e.g., options(xfun.md_table.digits 2, xfun.md_table.na = 'n/a')
.
A character vector.
knitr::kable()
(which supports more features)
xfun::md_table(head(iris))
xfun::md_table(mtcars, limit = c(10, 6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.