Skip to contents

Teal Core Functions

These are the main functions needed to build a teal app.

init()
Create the Server and UI Function For the Shiny App
module() toString(<teal_module>) print(<teal_module>)
Creates a teal_module object.
modules() toString(<teal_modules>) print(<teal_modules>)
Creates a teal_modules object.
srv_teal_with_splash()
Server function that loads the data through reactive loading and then delegates to srv_teal().
ui_teal_with_splash()
UI to show a splash screen in the beginning, then delegate to srv_teal()
default_filter()
Refers the default filter state

Example module

A simple example teal module

example_module()
An example teal module

Report previewer module

reporter_previewer_module()
Create a teal module for previewing a report

Functions moved to other packages

These functions have been moved from teal and will be deprecated.

log_app_usage()
Teal Application Usage Logging.
root_modules()
Deprecated: Creates the root modules container

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_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
get_rcode()
Returns R Code from a teal module
get_rcode_srv()
Server part of get R code module
get_rcode_ui()
Ui part of get R code module
show_rcode_modal()
Show R Code Modal

Deprecated function

bookmarkableShinyApp()
Make a Shiny UI function bookmarkable