Saves one or more tsg tables as a Word document using the officer and
flextable packages (both must be installed).
Usage
write_docx(
data,
path,
...,
title = NULL,
subtitle = NULL,
source_note = NULL,
footnotes = NULL,
separate_files = FALSE,
names_separator = "__",
facade = get_tsg_facade(which = "docx")
)Arguments
- data
A
tsgor data frame, or a named list of them.- path
File path for the Word output. A
.docxextension is added if missing. Whenseparate_files = TRUEthe path (minus extension) is used as the directory.- ...
Currently unused; reserved for future arguments.
- 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,FALSE(default) writes all tables into a single combined.docx;TRUEwrites one.docxper table inside a subdirectory.- names_separator
Column name separator for detecting cross-tab spanners. Default
"__".- facade
Styling options. Defaults to the global tsg facade.