Title: | Visualise OMOP Results using 'shiny' Applications |
---|---|
Description: | Visualise results obtained from analysing data mapped to the Observational Medical Outcomes Partnership (OMOP) common data model using 'shiny' applications. |
Authors: | Martí Català [aut, cre] , Yuchen Guo [aut] , Edward Burn [ctb] , Nuria Mercade-Besora [ctb] , Elin Rowlands [ctb] , Cecilia Campanile [ctb] |
Maintainer: | Martí Català <[email protected]> |
License: | Apache License (>= 2) |
Version: | 0.1.0 |
Built: | 2024-10-22 07:23:21 UTC |
Source: | CRAN |
Create a 'bslib::card()' object from a '.md' file.
cardFromMd(fileName)
cardFromMd(fileName)
fileName |
Name of the .md file. |
Ui 'bslib::card' with the background details.
Create a 'bslib::card()' object from a '<summarised_result>' object.
cardSummary(result)
cardSummary(result)
result |
A '<summarised_result>' object. |
A 'bslib::card()' object.
Add the strata, group and additional columns to settings with the tidyColumns ('visOmopResults::splitGroup()', 'visOmopResults::splitStrata()', ‘visOmopResults::splitAdditional()') for each ’result_id'.
correctSettings(result)
correctSettings(result)
result |
A '<summarised_result>' object. |
The summarised_result object with the settings corrected
Export and launch a static shiny specific to the provided results.
exportStaticApp( result, directory, logo = "ohdsi", title = "", background = TRUE, summary = TRUE, panels = list(), theme = NULL, open = rlang::is_interactive() )
exportStaticApp( result, directory, logo = "ohdsi", title = "", background = TRUE, summary = TRUE, panels = list(), theme = NULL, open = rlang::is_interactive() )
result |
A summarised_result object. |
directory |
Directory to create the shiny. |
logo |
Name of a logo or path to a logo. If NULL no logo is included. Only svg format allowed for the moment. |
title |
title of the shiny |
background |
Whether to include a background panel. Background panel content will be controlled from the generated background.md file. |
summary |
Whether to include a panel with a summary of content in the 'result'. |
panels |
List specifying order of results. Each panel is determined by the available result types in the result object. Panels for any available results not specified will be included after the specified result tabs. |
theme |
Assign a theme to the shiny app using bslib::bs_theme() |
open |
Whether to open the shiny app project. |
The shiny app will be created in directory.
exportStaticApp( result = emptySummarisedResult(), directory = tempdir(), theme = "bslib::bs_theme(bg = '#bb0a1e', fg = '#0000ff')" )
exportStaticApp( result = emptySummarisedResult(), directory = tempdir(), theme = "bslib::bs_theme(bg = '#bb0a1e', fg = '#0000ff')" )
This function is used to filter data in shinys that inputs are defined following.
filterData(result, resultType, input)
filterData(result, resultType, input)
result |
A summarised_result object. |
resultType |
A resultType of interest to filter by. |
input |
Input of the shiny to filter by. |
The filtered result.
Get the different options that a summarised_result have.
getChoices(result, flatten = FALSE)
getChoices(result, flatten = FALSE)
result |
A '<summarised_result>' object. |
flatten |
Whether to flatten to a single list or not. |
A named list with the options
library(CohortCharacteristics) cdm <- mockCohortCharacteristics() result <- cdm$cohort1 |> summariseCharacteristics() getChoices(result)
library(CohortCharacteristics) cdm <- mockCohortCharacteristics() result <- cdm$cohort1 |> summariseCharacteristics() getChoices(result)
Launch a dynamic shiny app where you can upload results.
launchDynamicApp()
launchDynamicApp()
Launches the shiny app.
Create a formatted gt table.
omopViewerTable( result, header = character(), group = character(), hide = character() )
omopViewerTable( result, header = character(), group = character(), hide = character() )
result |
A tibble it must contain at least two columns: estimate_value and estimate_type. |
header |
Column names to move to header, must be columns in result. |
group |
Column names to group by, must be columns in result. |
hide |
Column names to hide, must be columns in result. |
A gt table.
Get a tidy tibble from a 'summarised_result' object.
tidyData(result)
tidyData(result)
result |
A 'summarised_result' object. |
A tibble.