- Notifications
You must be signed in to change notification settings - Fork0
License
darwin-eu/visOmopResults
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
visOmopResults offers a set of functions tailored to format objectsof class<summarised_result> (as defined inomopgenericspackage).
It provides functionalities to create formattedtables and generateplots. These visualisations are highly versatile for reportingresults through Shiny apps, RMarkdown, Quarto, and more, supportingvarious output formats such as HTML, PNG, Word, and PDF.
You can install the latest version ofvisOmopResults from CRAN:
install.packages("visOmopResults")Or you can install the development version fromGitHub with:
# install.packages("pak")pak::pkg_install("darwin-eu/visOmopResults")
The<summarised_result> is a standardised output format utilizedacross various packages, including:
- CohortCharacteristics
- DrugUtilisation
- IncidencePrevalence
- PatientProfiles
- CodelistGenerator
- CohortSurvival
- CohortSymmetry
Although this standard output format is essential, it can sometimes bechallenging to manage. ThevisOmopResults package aims to simplifythis process. To demonstrate the package’s functionality, let’s start byusing some mock results:
library(visOmopResults)result<- mockSummarisedResult()
Currently all table functionalities are built around 4 packages:tibble,gt,flextable, anddatatable.
There are two main functions:
visOmopTable(): Creates a well-formatted table specifically from a<summarised_result>object.visTable(): Creates a nicely formatted table from any<data.frame>object.
Let’s see a simple example:
result|> filterStrata(sex!="overall"&age_group!="overall")|> visOmopTable(type="flextable",estimateName= c("N(%)"="<count> (<percentage>%)","N"="<count>","mean (sd)"="<mean> (<sd>)"),header= c("sex","age_group"),settingsColumn=NULL,groupColumn= c("cohort_name"),rename= c("Variable"="variable_name",""="variable_level"),hide="cdm_name",style="darwin" )
Currently all plot functionalities are built aroundggplot2. The output ofthese plot functions is a<ggplot2> object that can be furthercustomised.
There are three plotting functions:
plotScatter()to create a scatter plot.plotBar()to create a bar plot.plotBox()to create a box plot.
Additionally, thethemeVisOmop() function applies a consistent stylingto the plots, aligning them with the package’s visual design.
Let’s see how we can create a simple boxplot for age:
library(dplyr)result|> filter(variable_name=="number subjects")|> filterStrata(sex!="overall")|> barPlot(x="age_group",y="count",facet="cohort_name",colour="sex",style="darwin" )
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.


