The ftExtra package provides helper functions for the flextable package:
colformat_md
parses markdown texts in columnsspan_header
makes multi-level headersoptions(repos = c(atusy = 'https://atusy.r-universe.dev', getOption("repos")))
install.packages("ftExtra")
data.frame(
x = c("**bold**", "*italic*"),
y = c("^superscript^", "~subscript~"),
z = c("***~ft~^Extra^** is*", "*Cool*"),
stringsAsFactors = FALSE
) %>%
flextable() %>%
colformat_md()