Teal Gallery
  • Home
  • Demo

teal.gallery

A gallery of sample apps based on the teal framework.

Links to apps on shinyapps.io

Development version

  • RNA-seq
  • basic-teal
  • efficacy
  • exploratory
  • longitudinal
  • early-dev
  • patient-profile
  • python
  • safety

Running the apps

You can run any of these apps by just executing these two lines of code in your R console.

By sourcing the .R file you make sure that you have access to the restore_and_run()

Running the restore_and_run("APP_NAME") will run the APP_NAME by restoring the packages using renv

source("https://raw.github.com/insightsengineering/teal.gallery/main/_internal/utils/sourceme.R")
# Assuming you want to run the "basic-teal" app. Refer to the list above to know which apps are possible
restore_and_run("basic-teal")

Development

All teal sample apps are wrapped into this package for the sake of portability. All development standards and practices that we currently use for teal app development also apply to this repository.

Adding a sample app to teal.gallery

Adding a sample app involves the following steps:

  1. Copy each sample app into a file named app.R into a sensible folder name inside it’s own directory. The directory is also the APP_NAME.
  2. Make sure that {renv} is used for the teal app.
  3. Create a GIF recording (KAP is a good tool for this). Make sure that the dimensions of the GIF is 970x555 px and the size is about 1 MB. (It can be done by recording using KAP in 1470x840 px and rendering 5fps and downsizing 33%). Place the GIF inside the _internal/quarto/assets/img direcxtory. Also, make sure that the name of the GIF is APP_NAME.gif
  4. Update the _internal/quarto/demo-apps.yml with a new app/title. This should be the APP_NAME.
  5. Run the _internal/utils/generate_app_readme.R to generate the readme for the app inside it’s own directory.
Source Code
---
pagetitle: "Teal Gallery"
format: html
---


{{< include ../../README.md >}}
 
  • This website as well as code examples are licensed under the Apache License, Version 2.0.