Skip to contents

Generating a Static Shiny App

In this example, we will first ll create a static Shiny app using a filtered subset of result types:

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

Removing a Specific Panel Within a Tab

To remove the tidy panel under the summarise_omop_snapshot tab:

panelDetails = panelDetailsFromResult(result)
panelDetails$summarise_omop_snapshot$content$tidy <- NULL
exportStaticApp(result = result, directory = tempdir(),
                panelDetails = panelDetails)
#>  Processing data
#>  Data processed: 3 panels idenfied: `summarise_omop_snapshot`,
#>   `summarise_characteristics`, and `prevalence`.
#>  Creating shiny from provided data
#>  Shiny created in: /tmp/RtmpRfeOfT/shiny

Removing an Entire Tab

To remove the entire summarise_omop_snapshot tab:

panelDetails = panelDetailsFromResult(result)
panelDetails$summarise_omop_snapshot <- NULL
exportStaticApp(result = result, directory = tempdir(),
                panelDetails = panelDetails)
#>  Processing data
#>  Data processed: 2 panels idenfied: `summarise_characteristics` and
#>   `prevalence`.
#>  shiny folder will be overwritten.
#>  Prior shiny folder deleted.
#>  Creating shiny from provided data
#>  Shiny created in: /tmp/RtmpRfeOfT/shiny

This approach allows you to customise which panels or entire tabs are included in the generated static app.