Saves tables as PDF using gt::gtsave(), which requires the webshot2
package (and a Chromium installation reachable by chromote).
Usage
write_pdf(
data,
path,
...,
title = NULL,
subtitle = NULL,
source_note = NULL,
footnotes = NULL,
separate_files = TRUE,
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 PDF output. A
.pdfextension is added if missing. Whendatais a list andseparate_files = TRUE, this is used as a 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
datais a list,TRUE(default) saves each table as a separate PDF file inside a subdirectory;FALSEmerges them into a single PDF (requires qpdf).- names_separator
Column name separator for spanners. Default
"__".- facade
Styling options. Defaults to the global tsg facade.