server for adding views/cards to the Report.
For more details see the vignette: vignette("simpleReporter", "teal.reporter")
.
Arguments
- id
character(1)
thisshiny
module's id.- reporter
Reporter
instance.- card_fun
function
which returns aReportCard
instance, the function has optionalcard
andcomment
arguments. If thecard
argument is added then theReportCard
instance is automatically created for the user. If thecomment
argument is not specified then it is added automatically at the end of the Card.
Details
This module allows using a child of ReportCard
instead of ReportCard
.
To properly support this, an instance of the child class must be passed
as the default value of the card
argument in the card_fun
function.
See below:
CustomReportCard <- R6::R6Class( # nolint: object_name_linter.
classname = "CustomReportCard",
inherit = teal.reporter::ReportCard
)
custom_function <- function(card = CustomReportCard$new()) {
card
}