View source: R/downloadReport.R
downloadReportButtonServer | R Documentation |
Processes and initiates the download of a report.
downloadReportButtonServer(
id,
title = "Report",
author = "shinyDownload",
date = format(Sys.time(), "%d %B %Y"),
reportTemplateMaster,
reportTemplateImport = NULL,
params = NULL,
xelatex = FALSE,
toc = TRUE,
...
)
id |
Character value that uniquely identifies this instance of the
module. Should match up with the |
title |
The title of the compiled document. |
author |
The document author's name as a character string. |
date |
The date to appear at the start of the document. The default value is the current date according to the host system. The date should be provided as a character string. |
reportTemplateMaster |
The master rmarkdown template for the report. This template should not have a YAML header as this will be added by this report generation script. |
reportTemplateImport |
A character vector of additional files that may
be referred to by |
params |
A list of data/parameters that may be referred to by the report
templates. These values can then be referred to in your rmarkdown template
by calling values from the |
xelatex |
Specify that the XeLaTeX compiler should be used for PDF
documents instead of the default (pdflatex) compiler. XeLaTeX will will be
useful if you have unicode characters in your report. This is a logical
value, evaluated according to |
toc |
Logical to determine whether a table of contents is included at the start of the document. If the target file format is HTML, this value can also be written as "float" to get a floating table of contents which is always visible at the side of the screen or "collapse" for a floating toc showing expandable top-level (H2) headers. |
... |
Arguments to pass to the |
Downloads the report with the inputted filename. In the case of a .tex or .md output, the files will be provided as a .zip folder because these are intended to be compiled later by the user, who will need their plots which are attached as separate files. Note that .md formats are exported without a YAML header included. For all other formats, the downloaded file is in the intended format with all plots already embedded into the document. By default, HTML documents compile as a standalone document, meaning PNG figures are embedded into the standalone HTML file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.