# general data example
data <- teal_data()
data <- within(data, {
require(nestcolor)
iris <- iris
})
app <- init(
data = data,
modules = modules(
tm_data_table(
variables_selected = list(
iris = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species")
),
dt_args = list(caption = "IRIS Table Caption")
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
# CDISC data example
data <- teal_data()
data <- within(data, {
require(nestcolor)
ADSL <- teal.data::rADSL
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
app <- init(
data = data,
modules = modules(
tm_data_table(
variables_selected = list(ADSL = c("STUDYID", "USUBJID", "SUBJID", "SITEID", "AGE", "SEX")),
dt_args = list(caption = "ADSL Table Caption")
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
Run the code above in your browser using DataLab