library(knitr)
opts_chunk$set(warning = FALSE, echo = FALSE)
mt <- head(mtcars)

Goals

flextable

f <- flextable::flextable(head(mtcars))
f <- flextable::set_caption(f, "Flextable caption")
f

huxtable

library(huxtable)
options('huxtable.bookdown'=TRUE) # Should be automatic, just to be sure
h <- huxtable(mt, add_colnames = TRUE)
caption(h) <- "Huxtable caption"
label(h) <- "tab:mthux"
h


hughjonesd/huxtable documentation built on Feb. 17, 2024, 12:20 a.m.