simple_reporter {teal.reporter} | R Documentation |
Simple reporter module
Description
Module provides compact UI and server functions for managing a report in a shiny
app.
This module combines functionalities for adding cards to a report,
downloading the report, and resetting report content.
For more details see the vignette: vignette("simpleReporter", "teal.reporter")
.
Usage
simple_reporter_ui(id)
simple_reporter_srv(
id,
reporter,
card_fun,
global_knitr = getOption("teal.reporter.global_knitr"),
rmd_output = c(html = "html_document", pdf = "pdf_document", powerpoint =
"powerpoint_presentation", word = "word_document"),
rmd_yaml_args = list(author = "NEST", title = "Report", date =
as.character(Sys.Date()), output = "html_document", toc = FALSE)
)
Arguments
id |
( |
reporter |
( |
card_fun |
( |
global_knitr |
( |
rmd_output |
( |
rmd_yaml_args |
( |
Details
To access the default values for the global_knitr
parameter,
use getOption('teal.reporter.global_knitr')
. These defaults include:
-
echo = TRUE
-
tidy.opts = list(width.cutoff = 60)
-
tidy = TRUE
ifformatR
package is installed,FALSE
otherwise
Value
NULL
.
Examples
library(shiny)
if (interactive()) {
shinyApp(
ui = fluidPage(simple_reporter_ui("simple")),
server = function(input, output, session) {
simple_reporter_srv("simple", Reporter$new(), function(card) card)
}
)
}