add_card_button {teal.reporter}R Documentation

Add card button module

Description

[Experimental]

Provides a button to add views/cards to a report.

For more details see the vignette: vignette("simpleReporter", "teal.reporter").

Usage

add_card_button_ui(id)

add_card_button_srv(id, reporter, card_fun)

Arguments

id

(character(1)) this shiny module's id.

reporter

(Reporter) instance.

card_fun

(function) which returns a ReportCard instance. See Details.

Details

The card_fun function is designed to create a new ReportCard instance and optionally customize it:

This module supports using a subclass of ReportCard for added flexibility. A subclass instance should be passed as the default value of the card argument in the card_fun function. See below:

CustomReportCard <- R6::R6Class(
  classname = "CustomReportCard",
  inherit = teal.reporter::ReportCard
)

custom_function <- function(card = CustomReportCard$new()) {
  card
}

Value

NULL.


[Package teal.reporter version 0.3.1 Index]