Skip to contents

Core teal functions

Main functions needed to build a teal app

init()
Create the server and UI function for the shiny app
teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
Data module for teal applications
module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
Create teal_module and teal_modules objects.
ui_teal_with_splash() srv_teal_with_splash()
Add splash screen to teal application.
teal_slices() as.teal_slices() c(<teal_slices>)
Filter settings for teal applications

Helper Functions

Helper functions for teal

build_app_title()
Build app title with favicon

Example module

A simple teal module

example_module()
An example teal module

Creating reports

reporter_previewer_module()
Create a teal module for previewing a report
TealReportCard
TealReportCard
report_card_template()
Template function for TealReportCard creation and customization

Landing popup

landing_popup_module()
Landing popup module

Functions for module developers

as_tdata()
Downgrade teal_data objects in modules for compatibility
new_tdata()
Create a tdata object
get_code_tdata()
Wrapper for get_code.tdata
get_metadata()
Function to get metadata from a tdata object
tdata2env()
Function to convert a tdata object to an environment
teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
Data module for teal applications
show_rcode_modal()
Show R code modal
join_keys(<tdata>)
Extract join_keys from tdata

Validation functions

validate_has_data()
Validate that dataset has a minimum number of observations
validate_has_elements()
Validates that vector has length greater than 0
validate_has_variable()
Validates that dataset contains specific variable
validate_in()
Validates that vector includes all expected values
validate_inputs()
Send input validation messages to output.
validate_n_levels()
Validate that variables has expected number of levels
validate_no_intersection()
Validates no intersection between two vectors
validate_one_row_per_id()
Validate that dataset has unique rows for key variables