# load teal and all dependent packages
library(teal)
# create empty `teal_data` object
data <- teal_data()
# execute code within it
data <- within(data, {
IRIS <- iris
MTCARS <- mtcars
})
app <- init(
data = data,
modules = list(
example_module()
)
)
if (Sys.getenv("QUARTO_ROOT") == "") {
shinyApp(app$ui, app$server)
}
Exercise 1
Create your first teal
application!
Reference:
teal::init()
- the main function to create the applicationteal.data::teal_data()
- data input for teal applicationteal::example_module()
- a dummy module
Example
Using iris
and mtcars
datasets.
App
Exercise
Change the code above to use ADAM datasets. Please use following dataset(s):
teal.data::rADSL
- a dummy ADSL datasetteal.data::rADAE
- a dummy ADAE datasetteal.data::rADTTE
- a dummy ADTTE dataset
Please note these are case-sensitive and all are objects (i.e. no functions - no ()
needed).
Exercise (bonus)
Please read on teal::modify_title()
, teal::modify_header()
, teal::modify_footer()
here to further customise your application.