A reporting tool for Real-world Data based on Shiny & teal.modules.clinical. See here for a demo app.
Teal4Real brings the power of Teal to Real-world Data by transforming one-row-per-patient datasets to ADaM format that Teal understands.
In order to set up a Teal4Real reporting app for your bespoke dataset you need to provide:
-
a function that returns a one-row-per-patient dataset
-
some information on time-to-event endpoints in your dataset
-
optionally, a categorisation of variables (e.g. "main_prognostic", "main_treatment", etc.) that allows user-friendly configuration of the reporting app & setting of smart default/initial values.
You can install the most recent release from the git repo:
devtools::install_git("https://github.com/Genentech/Teal4Real", ref = "v0.0.6")
Or, alternatively, the most recent (development) version:
devtools::install_git("https://github.com/Genentech/Teal4Real")
To get started, run
Teal4Real::use_teal4real(overwrite = FALSE)
in order to copy all necessary Teal4Real files to a folder of your choice.
Once all packages have been installed with compatible versions, an example Teal4Real app should run out-of-the-box after opening Teal4Real_app.R
and pressing Run App
in Rstudio.
Follow this tutorial
After all Teal4Real
files have been copied, follow the package installation instructions in Teal4Real_app.R
. Teal is a modular framework made up of multiple packages, each one updating asynchronously. It is important that package versions are compatible with each other. In case of problems, try uninstalling all of them & reinstalling with the repos properly configured as described in Teal4Real_app.R
.
To customise your Teal4Real app, be sure to read & modify all Teal4Real
files that contain user
in the file name: Teal4Real_userdata.R
and Teal4Real_userconfig.R
.
Take into consideration that in order to publish a Teal4Reall app to an rsconnect server, any sourced R code required to generate the analysis dataset should be either in the same folder as the Teal4Real files, linked into said folder using dynamic links, or accessible via calling a function exported by an imported R package.
The easiest way is to just have all relevant R files in the same folder.
A note on caching: when the function that returns the analysis dataset is first called, the data is generated and can be cached for future calls if update_cache = FALSE
(in the config file Teal4Real_userconfig.R
). The default option is not to cache.
Caching leads to strong performance gains for the Shiny app when data-generation is time intense.
Coming soon...