The ftExtra package provides helper functions for the flextable package:
colformat_md
parses markdown texts in columnsspan_header
makes multi-level headers- and more!
install.packages("ftExtra")
options(repos = c(atusy = 'https://atusy.r-universe.dev', getOption("repos")))
install.packages("ftExtra")
library(ftExtra)
data.frame(
x = c("**bold**", "*italic*"),
y = c("^superscript^", "~subscript~"),
z = c("***~ft~^Extra^** is*", "*Cool*"),
stringsAsFactors = FALSE
) %>%
flextable() %>%
colformat_md()
iris %>%
head %>%
flextable() %>%
span_header()
library(dplyr, warn.conflicts = FALSE)
iris %>%
group_by(Species) %>%
slice(1:2) %>%
flextable()