Create a static shiny app

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

In this vignette we show the basis to create shiny apps. To do so we will use the mock results provided by the package:

library(OmopViewer)
omopViewerResults
summary(omopViewerResults)

Let's use a subset of the default result data set:

result <- omopViewerResults |>
  omopgenerics::filterSettings(
    result_type %in% c("summarise_omop_snapshot", "summarise_characteristics", "incidence")
  )

Using the default parameters you only have to provide a directory and a object.

exportStaticApp(result = result, directory = tempdir())

The panels that will be created are defined by the panelDetails argument. By default, a tab is created by each result_type of the result object. The default tab getPanel("default") is used if no tab is defined for that result_type in omopViewerPanels. Let's see the default panelDetails:

panelDetails <- panelDetailsFromResult(result)
panelDetails


Try the OmopViewer package in your browser

Any scripts or data that you put into this service are public.

OmopViewer documentation built on April 15, 2025, 5:08 p.m.