Generate output in specified format (e.g., xlsx, html, pdf, word)
Source:R/generate_output.R
generate_output.RdGenerate output in specified format (e.g., xlsx, html, pdf, word)
Usage
generate_output(
data,
path,
...,
format = c("xlsx", "gsheet", "html", "pdf", "word")
)Arguments
- data
Preferably a
tsgclass object for best results. A data frame, tibble, and list are also supported.- path
File path to save the output. For HTML/PDF with a list and
separate_files = TRUE(HTML) or any list (PDF), this is treated as a directory path. For"gsheet", a Google Sheet name or an existing sheet; seewrite_gsheet().- ...
Additional arguments passed to specific format functions:
"xlsx": passed towrite_xlsx"gsheet": passed towrite_gsheet(requires the googledrive package)"html": passed towrite_html(requires the gt package)"pdf": passed towrite_pdf(requires the gt and webshot2 packages)"word": passed towrite_docx(requires the officer and flextable packages)
- format
Output format. One of
"xlsx","gsheet"(Google Sheets),"html","pdf", or"word".