Display the AE by subgroups plot as a teal module
Arguments
- label
(
character(1)) Label shown in the navigation item for the module or module group. Formodules()defaults to"root". SeeDetails.- dataname
(
character(1))
analysis data used in the teal module, needs to be available in the list passed to thedataargument ofteal::init().- arm_var
(
choices_selected)
object with all available choices and the pre-selected option for variable names that can be used asarm_var. Seeteal.transform::choices_selected()for details. Columnarm_varin thedatanamehas to be a factor.- group_var
(
choices_selected) subgroups variables. Seeteal.transform::choices_selected()for details.- plot_height
(
numeric(3))
vector to indicate default value, minimum and maximum values.- plot_width
(
numeric(3))
vector to indicate default value, minimum and maximum values.- fontsize
(
numeric(1)ornumeric(3))
Defines initial possible range of font-size.fontsizeis set forteal.widgets::optionalSliderInputValMinMax()which controls font-size in the output plot.- transformators
(
listofteal_transform_module) that will be applied to transform module's data input. To learn more checkvignette("transform-input-data", package = "teal").
Value
the teal::module() object.
Reporting
This module returns an object of class teal_module, that contains a server function.
Since the server function returns a teal_report object, this makes this module reportable, which means that
the reporting functionality will be turned on automatically by the teal framework.
For more information on reporting in teal, see the vignettes:
vignette("reportable-shiny-application", package = "teal.reporter")vignette("adding-support-for-reporting-to-custom-modules", package = "teal")
Examples
# Example using stream (ADaM) dataset
data <- teal_data() %>%
within({
ADSL <- rADSL
ADAE <- rADAE
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
app <- init(
data = data,
modules = modules(
tm_g_ae_sub(
label = "AE by Subgroup",
dataname = "ADAE",
arm_var = choices_selected(
selected = "ACTARMCD",
choices = c("ACTARM", "ACTARMCD")
),
group_var = choices_selected(
selected = c("SEX", "REGION1", "RACE"),
choices = c("SEX", "REGION1", "RACE")
),
plot_height = c(600, 200, 2000)
)
)
)
#> Initializing tm_g_ae_sub
if (interactive()) {
shinyApp(app$ui, app$server)
}