IncidencePrevalence Module Class
IncidencePrevalence.RdIncidencePrevalence module that shows a that supports incidence; point and period prevalence results from the IncidencePrevalence package.
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.
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)
}
}
# }
}