R Markdown loop with flextable for HTML

library(flextable)
library(htmltools)
library(knitr)

opts_chunk$set(echo = TRUE)

ft_list <- list()

ft1 <- qflextable( head( airquality ))
ft1 <- set_caption(ft1,"airquality table")
ft_list[[1]] <- ft1

ft2 <- qflextable( tail( mtcars ))
ft2 <- set_caption(ft2,"mtcars table")
ft_list[[2]] <- ft2
div(flextable_html_dependency())
for(i in seq_along(ft_list)){
  flextable_to_rmd(ft_list[[i]])
}


Try the flextable package in your browser

Any scripts or data that you put into this service are public.

flextable documentation built on Oct. 30, 2024, 9:15 a.m.