View source: R/tm_g_pp_vitals.R
tm_g_pp_vitals | R Documentation |
This module produces a patient profile vitals ggplot2::ggplot()
type plot using ADaM datasets.
tm_g_pp_vitals(
label,
dataname = "ADVS",
parentname = "ADSL",
patient_col = "USUBJID",
paramcd = NULL,
aval = lifecycle::deprecated(),
aval_var = NULL,
xaxis = NULL,
font_size = c(12L, 12L, 25L),
plot_height = c(700L, 200L, 2000L),
plot_width = NULL,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args(),
transformators = list(),
decorators = list()
)
This plot supports horizontal lines for the following 6 PARAMCD
levels when they are present in dataname
:
"SYSBP"
, "DIABP"
, "TEMP"
, "RESP"
, "OXYSAT"
.
a teal_module
object.
This module generates the following objects, which can be modified in place using decorators:
plot
(ggplot
)
A Decorator is applied to the specific output using a named list of teal_transform_module
objects.
The name of this list corresponds to the name of the output to which the decorator is applied.
See code snippet below:
tm_g_pp_vitals( ..., # arguments for module decorators = list( plot = teal_transform_module(...) # applied only to `plot` output ) )
For additional details and examples of decorators, refer to the vignette
vignette("decorate-module-output", package = "teal.modules.clinical")
.
To learn more please refer to the vignette
vignette("transform-module-output", package = "teal")
or the teal::teal_transform_module()
documentation.
library(nestcolor)
data <- teal_data()
data <- within(data, {
ADSL <- tmc_ex_adsl
ADVS <- tmc_ex_advs
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
ADSL <- data[["ADSL"]]
ADVS <- data[["ADVS"]]
app <- init(
data = data,
modules = modules(
tm_g_pp_vitals(
label = "Vitals",
dataname = "ADVS",
parentname = "ADSL",
patient_col = "USUBJID",
plot_height = c(600L, 200L, 2000L),
paramcd = choices_selected(
choices = variable_choices(ADVS, "PARAMCD"),
selected = "PARAMCD"
),
xaxis = choices_selected(
choices = variable_choices(ADVS, "ADY"),
selected = "ADY"
),
aval_var = choices_selected(
choices = variable_choices(ADVS, "AVAL"),
selected = "AVAL"
)
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.