2. What is teal?
For more: `teal` documentation
shiny based reproducible framework
Modularized and open for customization
Provides data manipulation tools
Open source (Apache 2.0)
5. library(teal.data)
data <- teal_data() |>
within({
x <- data.frame(
numeric = 1:10,
character = letters[1:10],
logical = c(TRUE, FALSE),
date = as.Date("2019-01-01") + 1:10
)
})
data[["x"]] # get objects
get_code(data) # get code
● teal_data object contains code and
environment.
● use within() or eval_code() to
modify data.
● code ↔ environment.
For more: Including Reproducible Data
Composing teal app - reproducible teal_data
6. ● teal_module defines appearance
and functionality of a single tab.
● ui and server are classic shiny
modules.
● server receives data after
filtering.
module(
label = "simple module",
ui = function(id) {
ns <- NS(id)
fluidPage(tableOutput(ns("table")))
},
server = function(id, data) {
moduleServer(
id,
function(input, output, session) {
output$table <- renderTable(
data()[["ds1"]]
)
}
)
}
)
For more: Creating Custom Modules
Composing teal app - teal_module(s)