Saves one or more tsg tables as a Word document using the officer and
flextable packages (both must be installed).
write_docx(
data,
path,
...,
title = NULL,
subtitle = NULL,
source_note = NULL,
footnotes = NULL,
separate_files = FALSE,
names_separator = "__",
facade = get_tsg_facade(which = "docx")
)Invisibly returns NULL.
A tsg or data frame, or a named list of them.
File path for the Word output. A .docx extension is added if missing.
When separate_files = TRUE the path (minus extension) is used as the directory.
Currently unused; reserved for future arguments.
Optional title string (overrides data attribute).
Optional subtitle string.
Optional source note string.
Optional character vector of footnotes.
Logical. When data is a list, FALSE (default) writes
all tables into a single combined .docx; TRUE writes one .docx
per table inside a subdirectory.
Column name separator for detecting cross-tab spanners. Default
"__".
Styling options. Defaults to the global tsg facade.
When data is a named list and separate_files = FALSE (default), all
tables are written into a single .docx document, one per page. Set
separate_files = TRUE to write one .docx file per table inside a
subdirectory derived from path.