md_table | R Documentation |
Take a list of data frames or matrices and pass them to knitr::kable()
to
create a glue vector containing valid markdown tables.
md_table(x, ...)
x |
An |
... |
Arguments passed to |
FM enables the table
extension, where an additional leaf block type is
available.
A table is an arrangement of data with rows and columns, consisting of a single header row, a delimiter row separating the header from the data, and zero or more data rows.
Each row consists of cells containing arbitrary text, in which
inlines are parsed, separated by
pipes (|
). A leading and trailing pipe is also recommended for clarity of
reading, and if there’s otherwise parsing ambiguity. Spaces between pipes and
cell content are trimmed. Block-level elements cannot be inserted in a table.
The delimiter row consists of cells whose only content are hyphens (-
), and
optionally, a leading or trailing colon (:
), or both, to indicate left,
right, or center alignment respectively (see align
in knitr::kable()
).
A glue
vector of length one, with each element or row of x
separated by a newline.
Other leaf block functions:
md_blank()
,
md_chunk()
,
md_fence()
,
md_heading()
,
md_indent()
,
md_label()
,
md_paragraph()
,
md_reference()
,
md_rule()
,
md_setext()
Other markdown extensions:
md_issue()
,
md_strike()
md_table(mtcars)
md_table(data.frame(x = LETTERS[1:3], y = 1:3), align = c("cc"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.