Skip to contents

TreatmentPatterns module that shows a Sunburst plot and Sankey diagram, with a table.

Details

The module consists of the following:

"InputPanel"

Input panel to filter data.

"PlotWidget"

Sunburst Plot, visualizing the data.

"PlotWidget"

Sankey Diagram, visualizing the data.

"Table"

Table containing the data.

Super class

DarwinShinyModules::ShinyModule -> TreatmentPatterns

Active bindings

sankeyCols

(list(a = "#ff33cc")) Colours for the Sankey diagram.

sunburstCols

(list(domain = list(), range = list())) Colours for the Sunburst plot.

Methods

Inherited methods


Method new()

Initializer method

Usage

TreatmentPatterns$new(treatmentPathways)

Arguments

treatmentPathways

(data.frame) Contents of the treatmentPathways.csv file from the export() function of TreatmentPatterns.

Returns

(invisible(self))


Method clone()

The objects of this class are cloneable with this method.

Usage

TreatmentPatterns$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

{
library(DarwinShinyModules)

if (require("TreatmentPatterns", character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE)) {

  tp <- data.frame(
    path = c("A+B-C", "B+C-A", "B-A+C"),
    freq = 100,
    sex = "all",
    age = "all",
    indexYear = "all"
  )

  treatmentPathways <- TreatmentPatterns$new(treatmentPathways = tp)

  if (interactive()) {
    preview(treatmentPathways)
  }
}
}