Saves one or more tsg tables as an HTML file using the gt package
(which is already a hard dependency of tsg).
Usage
write_html(
data,
path,
...,
title = NULL,
subtitle = NULL,
source_note = NULL,
footnotes = NULL,
separate_files = FALSE,
include_table_list = FALSE,
names_separator = "__",
facade = get_tsg_facade(which = "html")
)Arguments
- data
A
tsgor data frame, or a named list of them.- path
File path for the HTML output. A
.htmlextension is added if missing. Whenseparate_files = TRUEthe path (minus extension) is used as the directory.- ...
Additional arguments passed to
tsg_to_gt().- title
Optional title string (overrides data attribute).
- subtitle
Optional subtitle string.
- source_note
Optional source note string.
- footnotes
Optional character vector of footnotes.
- separate_files
Logical. When
TRUEanddatais a list, each table is saved to its own HTML file inside a subdirectory derived frompath.- include_table_list
Logical. When
TRUEanddatais a named list withseparate_files = FALSE, prepends a clickable table of contents.- names_separator
Column name separator for spanners. Default
"__".- facade
Styling options. Defaults to the global tsg facade.