Skip to contents

IncidencePrevalence module that shows a that supports incidence; point and period prevalence results from the IncidencePrevalence package.

Value

self

Details

The module consists of the following:

"PlotPlotly"

Interactive Plotly plot, visualizing the data.

"GTTable"

gttable visualizing the tidy data

"GTTable"

gttable visualizing the attirtion data

"Table"

basic table visualizing the raw data

Super class

DarwinShinyModules::ShinyModule -> IncidencePrevalence

Active bindings

data

(summarised_result) Summarised result object.

dataType

(character(1)) Assumed data type of the provided data. One of: "Incidence", "Point Prevalence", or "Period Prevalence"

plotPlotly

(PlotPlotly) Module.

gtTable

(GTTable) Module.

gtAttrition

(GTTable) Module.

table

(Table) Module.

Methods

Inherited methods


Method new()

Initializer method

Usage

Arguments

data

(summarised_result) Result object from the IncidencePrevalence package.


Method clone()

The objects of this class are cloneable with this method.

Usage

IncidencePrevalence$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 <- readRDS(system.file(
      package = "DarwinShinyModules",
      "dummyData/IncidencePrevalence/0.9.0/incidence.rds"
    ))
    pointPrev <- readRDS(system.file(
      package = "DarwinShinyModules",
      "dummyData/IncidencePrevalence/0.9.0/pointPrevalence.rds"
    ))
    periodPrev <- readRDS(system.file(
      package = "DarwinShinyModules",
      "dummyData/IncidencePrevalence/0.9.0/periodPrevalence.rds"
    ))

    incMod <- IncidencePrevalence$new(data = inc)
    pointPrevMod <- IncidencePrevalence$new(data = pointPrev)
    periodPrevMod <- IncidencePrevalence$new(data = periodPrev)

    ui <- shiny::fluidPage(
      incMod$UI(),
      pointPrevMod$UI(),
      periodPrevMod$UI()
    )

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

    if (interactive()) {
      shiny::shinyApp(ui = ui, server = server)
    }
  }
# }
}