Usage
tm_g_spiderplot(
label,
dataname,
paramcd,
x_var,
y_var,
marker_var,
line_colorby_var,
xfacet_var = NULL,
yfacet_var = NULL,
vref_line = NULL,
href_line = NULL,
anno_txt_var = TRUE,
legend_on = FALSE,
plot_height = c(600L, 200L, 2000L),
plot_width = NULL,
pre_output = NULL,
post_output = NULL,
transformators = list()
)
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 thedata
argument ofteal::init()
.- paramcd
(
character(1)
orchoices_selected
)
variable value designating the studied parameter. Seeteal.transform::choices_selected()
for details.- x_var
x-axis variables
- y_var
y-axis variables
- marker_var
variable dictates marker symbol
- line_colorby_var
variable dictates line color
- xfacet_var
variable for x facets
- yfacet_var
variable for y facets
- vref_line
vertical reference lines
- href_line
horizontal reference lines
- anno_txt_var
annotation text
- legend_on
boolean value for whether legend is displayed
- 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.- pre_output
(
shiny.tag
) optional,
with text placed before the output to put the output into context. For example a title.- post_output
(
shiny.tag
) optional, with text placed after the output to put the output into context. For example theshiny::helpText()
elements are useful.- transformators
(
list
ofteal_transform_module
) that will be applied to transform module's data input. To learn more checkvignette("data-transform-as-shiny-module", package = "teal")
.
Value
the teal::module()
object.
Examples
# Example using stream (ADaM) dataset
data <- teal_data() |>
within({
ADSL <- rADSL
ADTR <- rADTR
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
app <- init(
data = data,
modules = modules(
tm_g_spiderplot(
label = "Spider plot",
dataname = "ADTR",
paramcd = choices_selected(
choices = "SLDINV",
selected = "SLDINV"
),
x_var = choices_selected(
choices = "ADY",
selected = "ADY"
),
y_var = choices_selected(
choices = c("PCHG", "CHG", "AVAL"),
selected = "PCHG"
),
marker_var = choices_selected(
choices = c("SEX", "RACE", "USUBJID"),
selected = "SEX"
),
line_colorby_var = choices_selected(
choices = c("SEX", "USUBJID", "RACE"),
selected = "SEX"
),
xfacet_var = choices_selected(
choices = c("SEX", "ARM"),
selected = "SEX"
),
yfacet_var = choices_selected(
choices = c("SEX", "ARM"),
selected = "ARM"
),
vref_line = "10, 37",
href_line = "-20, 0"
)
)
)
#> Initializing tm_g_spiderplot
if (interactive()) {
shinyApp(app$ui, app$server)
}