Format character columns as markdown text
colformat_md( x, j = where(is.character), part = c("body", "header", "all"), auto_color_link = "blue", md_extensions = NULL, pandoc_args = NULL, .from = "markdown+autolink_bare_uris", .footnote_options = footnote_options() )
x | A |
---|---|
j | Columns to be treated as markdown texts.
Selection can be done by the semantics of |
part | One of "body", "header", and "all". If "all", formatting proceeds in the order of "header" and "body". |
auto_color_link | A color of the link texts. |
md_extensions | Pandoc's extensions. Although it is prefixed with "md", extensions for any
formats specified to |
pandoc_args | Additional command line options to pass to pandoc |
.from | Pandoc's |
.footnote_options | Options for footnotes generated by |
if (rmarkdown::pandoc_available()) { d <- data.frame( x = c("**bold**", "*italic*"), y = c("^superscript^", "~subscript~"), z = c("***^ft^~Extra~** is*", "*Cool*") ) colformat_md(flextable::flextable(d)) }#> a flextable object. #> col_keys: `x`, `y`, `z` #> header has 1 row(s) #> body has 2 row(s) #> original dataset sample: #> x y z #> 1 **bold** ^superscript^ ***^ft^~Extra~** is* #> 2 *italic* ~subscript~ *Cool*