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. It can have optionalcard
,comment
andlabel
parameters. Ifcard
parameter is added, then theReportCard
instance is created for the user. Usecomment
parameter to pass it's value whenever you prefer withcard$append_text()
- ifcard_fun
does not havecomment
parameter, thencomment
fromAdd Card UI
module will be added at the end of the content of the card. Iflabel
parameter is provided, you can use it to customize appearance of thecard name
and use if to specifycard
content withcard$append_text()
- ifcard_fun
does not havelabel
parameter, thencard name
will be set to the name passed inAdd Card UI
module, but no text will be added to the content of thecard
.
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
}