Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

save_as_html

Save a Flextable in an HTML File


Description

save a flextable in an HTML file. This function is useful to save the flextable in HTML file without using R Markdown (it is highly recommanded to use R Markdown instead).

Usage

save_as_html(
  ...,
  values = NULL,
  path,
  encoding = "utf-8",
  title = deparse(sys.call())
)

Arguments

...

flextable objects, objects, possibly named. If named objects, names are used as titles.

values

a list (possibly named), each element is a flextable object. If named objects, names are used as titles. If provided, argument ... will be ignored.

path

HTML file to be created

encoding

encoding to be used in the HTML file

title

page title

See Also

Examples

ft1 <- flextable( head( iris ) )
tf1 <- tempfile(fileext = ".html")
save_as_html(ft1, path = tf1)
# browseURL(tf1)

ft2 <- flextable( head( mtcars ) )
tf2 <- tempfile(fileext = ".html")
save_as_html(
  `iris table` = ft1,
  `mtcars table` = ft2,
  path = tf2,
  title = "rhoooo")
# browseURL(tf2)

flextable

Functions for Tabular Reporting

v0.6.10
GPL-3
Authors
David Gohel [aut, cre], Clementine Jager [ctb], Quentin Fazilleau [ctb], Maxim Nazarov [ctb] (rmarkdown for docx output), Titouan Robert [ctb], Michael Barrowman [ctb] (inline footnotes), Atsushi Yasumoto [ctb] (support for bookdown cross reference), Paul Julian [ctb] (support for gam objects)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.