Skip to contents

Incidence module that shows incidence results from the IncidencePrevalence package.

Value

self

Super class

DarwinShinyModules::ShinyModule -> Incidence

Active bindings

result

(summarisedResult) SummarisedResult object from Incidence.

pickers

(list) List of pickers

Methods

Inherited methods


Method new()

Initializer method

Usage

Incidence$new(result, defaults = list(), ...)

Arguments

result

(summarised_result) Result object from the IncidencePrevalence package.

defaults

list of default values for the pickers

...

Additional parameters to set fields from the ShinyModule parent.


Method clone()

The objects of this class are cloneable with this method.

Usage

Incidence$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

{
# \donttest{
 library(DarwinShinyModules)

 if (
   require(
     "IncidencePrevalence",
     character.only = TRUE,
     quietly = TRUE,
     warn.conflicts = FALSE
   )
 ) {
    inc <- omopgenerics::importSummarisedResult(system.file(
      package = "DarwinShinyModules",
      "dummyData/IncidencePrevalence/1.2.0/incidence.csv"
    ))

    incMod <- Incidence$new(result = inc,
                            defaults = list(sex = "Both"))

    ui <- shiny::fluidPage(
      incMod$UI()
    )

    server <- function(input, output, session) {
      incMod$server(input, output, session)
    }

    if (interactive()) {
      shiny::shinyApp(ui = ui, server = server)
    }
  }
# }
}
#> Reading file:
#> /home/runner/work/_temp/Library/DarwinShinyModules/dummyData/IncidencePrevalence/1.2.0/incidence.csv.
#> Converting to summarised_result:
#> /home/runner/work/_temp/Library/DarwinShinyModules/dummyData/IncidencePrevalence/1.2.0/incidence.csv.