Usage
tm_g_forest_tte(
label,
adtte_name,
mae_name,
adtte_vars = list(aval = "AVAL", is_event = "is_event", paramcd = "PARAMCD", usubjid =
"USUBJID", avalu = "AVALU"),
exclude_assays = "counts",
summary_funs = list(Mean = colMeans, Median = matrixStats::colMedians, Max =
matrixStats::colMaxs),
pre_output = NULL,
post_output = NULL,
plot_height = c(600L, 200L, 2000L),
plot_width = c(1360L, 500L, 2000L)
)
ui_g_forest_tte(
id,
adtte_name,
mae_name,
summary_funs,
pre_output,
post_output
)
srv_g_forest_tte(
id,
data,
filter_panel_api,
reporter,
adtte_name,
mae_name,
adtte_vars,
exclude_assays,
summary_funs,
plot_height,
plot_width
)
sample_tm_g_forest_tte()
Arguments
- label
(
string
)
menu item label of the module in the teal app.- adtte_name
(
string
)
name of theADTTE
dataset.- mae_name
(
string
)
name of the MAE data used in the teal module.- adtte_vars
(named
list
ofstring
)
names of the variables to use in theADTTE
dataset. It should comprise elements:aval
: the numeric time-to-event variable.avalu
: the variable holding the unit ofaval
.is_event
: the logical event variable. It needs to beTRUE
when there was an observed event, andFALSE
if the time is censored without observed event.paramcd
: the character or factor parameter code variable, defining the type of time-to-event for selection in the module.usubjid
: the subject ID variable.
- exclude_assays
(
character
)
names of the assays which should not be included in choices in the teal module.- summary_funs
(named
list
of functions orNULL
)
functions which can be used in the the gene signatures. For modules that support also multiple genes without summary,NULL
can be included to not summarize the genes but provide all of them.- pre_output
(
shiny.tag
orNULL
)
placed before the output to put the output into context (for example a title).- post_output
(
shiny.tag
orNULL
)
placed after the output to put the output into context (for example theshiny::helpText()
elements can be useful).- plot_height
(
list
)
list of integers to set the default, minimum, and maximum plot height.- plot_width
(
list
)
list of integers to set the default, minimum, and maximum plot width.- id
(
string
) the shiny module id.- data
(
reactive
)reactive(<teal_data>)
holding all the data sets provided during app initialization after going through the filters.- filter_panel_api
(
FilterPanelAPI
)
object describing the actual filter panel API.- reporter
(
Reporter
) object
Functions
ui_g_forest_tte()
: sets up the user interface.srv_g_forest_tte()
: sets up the server with reactive graph.sample_tm_g_forest_tte()
: sample module function.
Examples
data <- teal_data()
data <- within(data, {
ADTTE <- teal.modules.hermes::rADTTE %>%
dplyr::mutate(is_event = .data$CNSR == 0)
MAE <- hermes::multi_assay_experiment
})
datanames <- c("ADTTE", "MAE")
datanames(data) <- datanames
join_keys(data)["ADTTE", "ADTTE"] <- c("STUDYID", "USUBJID", "PARAMCD")
app <- init(
data = data,
modules = modules(
tm_g_forest_tte(
label = "forestplot",
adtte_name = "ADTTE",
mae_name = "MAE"
)
)
)
#> [INFO] 2024-02-13 21:31:43.9954 pid:1218 token:[] teal.modules.hermes Initializing tm_g_forest_tte
if (interactive()) {
shinyApp(app$ui, app$server)
}
# Alternatively you can run the sample module with this function call:
if (interactive()) {
sample_tm_g_forest_tte()
}