Skip to contents

darwinApp

Usage

darwinApp(appStructure, title = NULL, studyStatus = "ongoing")

Arguments

appStructure

(list(list())) A list of named lists, containing modules. The level of nesting groups or separates modules in menu items "_" will be read as a space.

title

(character(1): NULL) Title of the app

studyStatus

(character(1): "ongoing") Status of the study

Value

NULL

Examples

library(DarwinShinyModules)
library(ggplot2)

mtcarsTable <- Table$new(data = mtcars)
irisTable <- Table$new(data = iris)

irisPlotFun <- function(data) {
  ggplot(data = data, mapping = aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
    geom_point() +
    theme_bw()
}

irisPlot <- PlotStatic$new(fun = irisPlotFun, args = list(data = iris))

if (interactive()) {
  darwinApp(
    moduleList = list(
      # Menu item `Iris`
      Iris = list(irisPlot, irisTable),
      # Menu item `MT Cars`
      MT_Cars = list(mtcarsTable)
    )
  )
}