Wrappers around srv_transform_teal_data
that allows to decorate
-
Usage
+
Usage
+
srv_decorate_teal_data ( id , data , decorators , expr , expr_is_reactive = FALSE )
ui_decorate_teal_data ( id , decorators , ... )
-
Arguments
+
Arguments
+
-
id
+
+id
+
(character(1)
) Module id
-data
+data
+
(reactive teal_data
)
-expr
+expr
+
(expression
or reactive
) to evaluate on the output of the decoration.
When an expression it must be inline code. See within()
Default is NULL
which won't evaluate any appending code.
-expr_is_reactive
+expr_is_reactive
+
(logical(1)
) whether expr
is a reactive expression
that skips defusing the argument.
-
+
+
-
Details
+
Details
+
srv_decorate_teal_data
is a wrapper around srv_transform_teal_data
that
allows to decorate the data with additional expressions.
When original teal_data
object is in error state, it will show that error
@@ -89,17 +135,19 @@
Details
+
+
-
+
+
-
+
+
diff --git a/main/reference/substitute_names.html b/main/reference/substitute_names.html
index d00660719..48ec78d64 100644
--- a/main/reference/substitute_names.html
+++ b/main/reference/substitute_names.html
@@ -1,7 +1,23 @@
-
-Substitute Names in a Quoted Expression — substitute_names • teal.modules.clinical
+
+
+
+
+
+
+Substitute Names in a Quoted Expression — substitute_names • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -53,7 +90,8 @@ Substitute Names in a Quoted Expression
-
Usage
+
Usage
+
substitute_names ( expr , names , others = list ( ) )
h_subst_lhs_names ( qexpr , names )
@@ -64,60 +102,75 @@ Usage
-
Arguments
+
Arguments
+
-
expr
+
+expr
+
(language
) an expression.
-names
+names
+
(named list
of name
) requested name substitutions.
-others
+others
+
(named list
) requested other substitutions which will only happen on the
right-hand side.
-qexpr
+qexpr
+
(language
) a quoted expression.
-env
+env
+
(environment
or list
) requested variable substitutions.
-
+
+
-
Value
+
Value
+
The modified expression.
-
Functions
+
Functions
+
-
+
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/substitute_q.html b/main/reference/substitute_q.html
index 0d959c3c3..805cdc763 100644
--- a/main/reference/substitute_q.html
+++ b/main/reference/substitute_q.html
@@ -1,9 +1,25 @@
-
-Substitute in Quoted Expressions — substitute_q • teal.modules.clinical
+
+
+
+
+
+Substitute in Quoted Expressions — substitute_q • teal.modules.clinical
+
+
+
+
+
+
+
+a quoted expression.">
+
+
+
+
Skip to contents
@@ -19,24 +35,45 @@
+
+
@@ -56,47 +93,58 @@ Substitute in Quoted Expressions
-
Arguments
+
Arguments
+
-
qexpr
+
+qexpr
+
(language
) a quoted expression.
-env
+env
+
(environment
or list
) requested variable substitutions.
-
+
+
-
Value
+
Value
+
The modified expression.
-
Note
+
Note
+
This is simplified from the package pryr
to avoid another dependency.
+
+
-
+
+
-
+
+
diff --git a/main/reference/teal.modules.clinical-package.html b/main/reference/teal.modules.clinical-package.html
index c6bfa9485..45584e716 100644
--- a/main/reference/teal.modules.clinical-package.html
+++ b/main/reference/teal.modules.clinical-package.html
@@ -1,7 +1,23 @@
-
-teal Modules for Standard Clinical Outputs — teal.modules.clinical-package • teal.modules.clinical
+
+
+
+
+
+
+teal Modules for Standard Clinical Outputs — teal.modules.clinical-package • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -42,7 +79,8 @@
@@ -54,16 +92,24 @@ teal
Modules for Standard Clinical Outputs
+
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_a_gee.html b/main/reference/template_a_gee.html
index 77cd59eee..2c3e53f95 100644
--- a/main/reference/template_a_gee.html
+++ b/main/reference/template_a_gee.html
@@ -1,5 +1,21 @@
-
-Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee • teal.modules.clinical
+
+
+
+
+
+
+Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template for Generalized Estimating Equations (GEE) analysis module
-
Usage
+
Usage
+
template_a_gee (
output_table ,
data_model_fit = "ANL" ,
@@ -69,79 +107,97 @@ Usage
-
Arguments
+
Arguments
+
-
output_table
+
+output_table
+
(character
) type of output table ("t_gee_cov", "t_gee_coef", "t_gee_lsmeans"
).
-data_model_fit
+data_model_fit
+
(character
) dataset used to fit the model by tern.gee::fit_gee()
.
-dataname_lsmeans
+dataname_lsmeans
+
(character
) dataset used for alt_counts_df
argument of rtables::build_table()
.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-id_var
+id_var
+
(character
) the variable name for subject id.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-visit_var
+visit_var
+
(character
) variable names that can be used as visit
variable. Must be a factor in
dataname
.
-split_covariates
+split_covariates
+
(character
) vector of names of variables to use as covariates in
tern.gee::vars_gee()
.
-cor_struct
+cor_struct
+
(character
) assumed correlation structure in tern.gee::fit_gee
.
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_abnormality.html b/main/reference/template_abnormality.html
index a1dcf344b..f196cd1fd 100644
--- a/main/reference/template_abnormality.html
+++ b/main/reference/template_abnormality.html
@@ -1,5 +1,21 @@
-
-Template: Abnormality Summary Table — template_abnormality • teal.modules.clinical
+
+
+
+
+
+
+Template: Abnormality Summary Table — template_abnormality • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Abnormality Summary Table
-
Usage
+
Usage
+
template_abnormality (
parentname ,
dataname ,
@@ -73,109 +111,133 @@ Usage
-
Arguments
+
Arguments
+
-
parentname
+
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-id_var
+id_var
+
(character
) the variable name for subject id.
-by_vars
+by_vars
+
(character
) variable names used to split the summary by rows.
-abnormal
+abnormal
+
(named list
) indicating abnormality direction and grades.
-grade
+grade
+
(character
) name of the variable used to
specify the abnormality grade. Variable must be factor.
-baseline_var
+baseline_var
+
(character
)
name of the variable specifying baseline abnormality grade.
-treatment_flag_var
+treatment_flag_var
+
(character
) name of the on treatment flag variable.
-treatment_flag
+treatment_flag
+
(character
) name of the value indicating on treatment
records in treatment_flag_var
.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-exclude_base_abn
+exclude_base_abn
+
(logical
) whether to exclude patients who had abnormal values at baseline.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-na_level
+na_level
+
(character
) the NA level in the input dataset, defaults to "<Missing>"
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-tbl_title
+tbl_title
+
(character
) Title with label of variables from by bars
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_abnormality_by_worst_grade.html b/main/reference/template_abnormality_by_worst_grade.html
index 26e879111..5bce77014 100644
--- a/main/reference/template_abnormality_by_worst_grade.html
+++ b/main/reference/template_abnormality_by_worst_grade.html
@@ -1,5 +1,21 @@
-
-Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade • teal.modules.clinical
+
+
+
+
+
+
+Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Laboratory test results with highest grade post-baseline
-
Usage
+
Usage
+
template_abnormality_by_worst_grade (
parentname ,
dataname ,
@@ -69,93 +107,113 @@ Usage
-
Arguments
+
Arguments
+
-
parentname
+
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-id_var
+id_var
+
(character
) the variable name for subject id.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-atoxgr_var
+atoxgr_var
+
(character
) name of the variable indicating
Analysis Toxicity Grade.
-worst_high_flag_var
+worst_high_flag_var
+
(character
) name of the variable indicating
Worst High Grade flag
-worst_low_flag_var
+worst_low_flag_var
+
(character
) name of the variable indicating
Worst Low Grade flag
-worst_flag_indicator
+worst_flag_indicator
+
(character
) flag value indicating the worst grade.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_adverse_events.html b/main/reference/template_adverse_events.html
index 2a240ed07..27f12d30e 100644
--- a/main/reference/template_adverse_events.html
+++ b/main/reference/template_adverse_events.html
@@ -1,5 +1,21 @@
-
-Template: Patient Profile Adverse Events Table and Plot — template_adverse_events • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Adverse Events Table and Plot — template_adverse_events • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Patient Profile Adverse Events Table and Plot
-
Usage
+
Usage
+
template_adverse_events (
dataname = "ANL" ,
aeterm = "AETERM" ,
@@ -67,77 +105,95 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-aeterm
+aeterm
+
(character
) name of the reported term for the adverse event variable.
-tox_grade
+tox_grade
+
(character
) name of the standard toxicity grade variable.
-causality
+causality
+
(character
) name of the causality variable.
-outcome
+outcome
+
(character
) name of outcome of adverse event variable.
-action
+action
+
(character
) name of action taken with study treatment variable.
-time
+time
+
(character
) name of study day of start of adverse event variable.
-decod
+decod
+
(character
) name of dictionary derived term variable.
-patient_id
+patient_id
+
(character
) patient ID.
-font_size
+font_size
+
(numeric
) font size value.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_ancova.html b/main/reference/template_ancova.html
index c858e90c0..144a2f5cf 100644
--- a/main/reference/template_ancova.html
+++ b/main/reference/template_ancova.html
@@ -1,5 +1,21 @@
-
-Template: ANCOVA Summary — template_ancova • teal.modules.clinical
+
+
+
+
+
+
+Template: ANCOVA Summary — template_ancova • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: ANCOVA Summary
-
Usage
+
Usage
+
template_ancova (
dataname = "ANL" ,
parentname = "ADSL" ,
@@ -75,117 +113,143 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-label_aval
+label_aval
+
(character
)
label of value variable used for title rendering.
-cov_var
+cov_var
+
(character
) names of the covariates variables.
-include_interact
+include_interact
+
(logical
) whether an interaction term should be included in the model.
-interact_var
+interact_var
+
(character
) name of the variable that should have interactions with arm. If the
interaction is not needed, the default option is NULL
.
-interact_y
+interact_y
+
(character
) a selected item from the interact_var
column which will be used to select the
specific ANCOVA results. If the interaction is not needed, the default option is FALSE
.
-paramcd_levels
+paramcd_levels
+
(character
)
variable levels for the studied parameter.
-paramcd_var
+paramcd_var
+
(character
)
variable name for the studied parameter.
-label_paramcd
+label_paramcd
+
(character
)
variable label used for title rendering.
-visit_levels
+visit_levels
+
(character
)
variable levels for studied visits.
-visit_var
+visit_var
+
(character
) variable names that can be used as visit
variable. Must be a factor in
dataname
.
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_arguments.html b/main/reference/template_arguments.html
index 5f233ac31..b5a974353 100644
--- a/main/reference/template_arguments.html
+++ b/main/reference/template_arguments.html
@@ -1,7 +1,23 @@
-
-Standard Template Arguments — template_arguments • teal.modules.clinical
+
+
+
+
+
+
+Standard Template Arguments — template_arguments • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -54,272 +91,335 @@ Standard Template Arguments
-
Arguments
+
Arguments
+
-
add_total
+
+add_total
+
(logical
) whether to include column with total number of patients.
-anl_name
+anl_name
+
(character
) analysis data used in teal module.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-atirel
+atirel
+
(character
) name of time relation of medication variable.
-aval
+aval
+
Please use the aval_var
argument instead.
-avalu
+avalu
+
Please use the avalu_var
argument instead.
-avalu_var
+avalu_var
+
(character
) name of the analysis value unit variable.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-baseline_var
+baseline_var
+
(character
) name of the variable for baseline values of the analysis variable.
-base_var
+base_var
+
Please use the baseline_var
argument instead.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-by_vars
+by_vars
+
(character
) variable names used to split the summary by rows.
-cmdecod
+cmdecod
+
(character
) name of standardized medication name variable.
-cmindc
+cmindc
+
(character
) name of indication variable.
-cmstdy
+cmstdy
+
(character
) name of study relative day of start of medication variable.
-cnsr_var
+cnsr_var
+
(character
) name of the censoring variable.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-compare_arm
+compare_arm
+
(logical
) triggers the comparison between study arms.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-control
+control
+
(list
) list of settings for the analysis.
-cov_var
+cov_var
+
(character
) names of the covariates variables.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-denominator
+denominator
+
(character
) chooses how percentages are calculated. With option N
, the reference
population from the column total is used as the denominator. With option n
, the number of non-missing
records in this row and column intersection is used as the denominator. If omit
is chosen, then the
percentage is omitted.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-event_type
+event_type
+
(character
) type of event that is summarized (e.g. adverse event, treatment). Default
is "event"
.
-font_size
+font_size
+
(numeric
) font size value.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-hlt
+hlt
+
(character
) name of the variable with high level term for events.
-id_var
+id_var
+
(character
) the variable name for subject id.
-include_interact
+include_interact
+
(logical
) whether an interaction term should be included in the model.
-label_hlt
+label_hlt
+
(string
) label of the hlt
variable from dataname
. The label will be extracted from the
module.
-label_llt
+label_llt
+
(string
) label of the llt
variable from dataname
. The label will be extracted from the
module.
-llt
+llt
+
(character
) name of the variable with low level term for events.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-na.rm
+na.rm
+
(logical
) whether NA
values should be removed prior to analysis.
-numeric_stats
+numeric_stats
+
(character
) names of statistics to display for numeric summary variables. Available
statistics are n
, mean_sd
, mean_ci
, median
, median_ci
, quantiles
, range
, and geom_mean
.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_id
+patient_id
+
(character
) patient ID.
-prune_diff
+prune_diff
+
(number
) threshold to use for trimming table using as criteria difference in
rates between any two columns.
-prune_freq
+prune_freq
+
(number
) threshold to use for trimming table using event incidence rate in any column.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-sort_criteria
+sort_criteria
+
(character
) how to sort the final table. Default option freq_desc
sorts
on column sort_freq_col
by decreasing number of patients with event. Alternative option alpha
sorts events
alphabetically.
-strata_var
+strata_var
+
(character
) names of the variables for stratified analysis.
-subgroup_var
+subgroup_var
+
(character
) with variable names that can be used as subgroups.
-sum_vars
+sum_vars
+
(character
) names of the variables that should be summarized.
-time_points
+time_points
+
(character
) time points that can be used in tern::surv_timepoint()
.
-time_unit_var
+time_unit_var
+
(character
) name of the variable representing time units.
-title
+title
+
(character
) title of the output.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-treatment_flag
+treatment_flag
+
(character
) name of the value indicating on treatment
records in treatment_flag_var
.
-treatment_flag_var
+treatment_flag_var
+
(character
) name of the on treatment flag variable.
-useNA
+useNA
+
(character
) whether missing data (NA
) should be displayed as a level.
-var_labels
+var_labels
+
(named character
) optional variable labels for relabeling the analysis variables.
-visit_var
+visit_var
+
(character
) variable names that can be used as visit
variable. Must be a factor in
dataname
.
-worst_flag_indicator
+worst_flag_indicator
+
(character
) value indicating worst grade.
-worst_flag_var
+worst_flag_var
+
(character
) name of the worst flag variable.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
-
Details
+
Details
+
Although this function just returns NULL
it has two uses, for
the teal module users it provides a documentation of arguments that are
commonly and consistently used in the framework. For the developer it adds a
@@ -328,17 +428,19 @@
Details
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_basic_info.html b/main/reference/template_basic_info.html
index fbdd83190..a36336eda 100644
--- a/main/reference/template_basic_info.html
+++ b/main/reference/template_basic_info.html
@@ -1,5 +1,21 @@
-
-Template: Patient Profile Basic Info — template_basic_info • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Basic Info — template_basic_info • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,47 +87,58 @@ Template: Patient Profile Basic Info
-
Usage
+
Usage
+
template_basic_info ( dataname = "ANL" , vars , patient_id = NULL )
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-vars
+vars
+
(character
) names of the variables to be shown in the table.
-patient_id
+patient_id
+
(character
) patient ID.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_binary_outcome.html b/main/reference/template_binary_outcome.html
index 18e014940..da12b6b5e 100644
--- a/main/reference/template_binary_outcome.html
+++ b/main/reference/template_binary_outcome.html
@@ -1,5 +1,21 @@
-
-Template: Binary Outcome — template_binary_outcome • teal.modules.clinical
+
+
+
+
+
+
+Template: Binary Outcome — template_binary_outcome • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Binary Outcome
-
Usage
+
Usage
+
template_binary_outcome (
dataname ,
parentname ,
@@ -75,107 +113,131 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-paramcd
+paramcd
+
(character
) response parameter value to use in the table title.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-compare_arm
+compare_arm
+
(logical
) triggers the comparison between study arms.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-show_rsp_cat
+show_rsp_cat
+
(logical
) display the multinomial response estimations.
-responder_val
+responder_val
+
(character
) the short label for observations to
translate AVALC
into responder/non-responder.
-responder_val_levels
+responder_val_levels
+
(character
) the levels of responses that will be shown in the multinomial
response estimations.
-control
+control
+
(list
) list of settings for the analysis.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_coxreg_m.html b/main/reference/template_coxreg_m.html
index 191e6b7ed..76bba0dca 100644
--- a/main/reference/template_coxreg_m.html
+++ b/main/reference/template_coxreg_m.html
@@ -1,5 +1,21 @@
-
-Template: Multi-Variable Cox Regression — template_coxreg_m • teal.modules.clinical
+
+
+
+
+
+
+Template: Multi-Variable Cox Regression — template_coxreg_m • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Multi-Variable Cox Regression
-
Usage
+
Usage
+
template_coxreg_m (
dataname ,
cov_var ,
@@ -70,92 +108,113 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-cov_var
+cov_var
+
(character
) names of the covariates variables.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-cnsr_var
+cnsr_var
+
(character
) name of the censoring variable.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-at
+at
+
(list
of numeric
) when the candidate covariate is a numeric
type variable, use at
to specify the value of the covariate at which the effect should be estimated.
-strata_var
+strata_var
+
(character
) names of the variables for stratified analysis.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-control
+control
+
(list
) list of settings for the analysis (see tern::control_coxreg()
).
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_coxreg_u.html b/main/reference/template_coxreg_u.html
index d5fd9d64b..2b5ae5a64 100644
--- a/main/reference/template_coxreg_u.html
+++ b/main/reference/template_coxreg_u.html
@@ -1,5 +1,21 @@
-
-Template: Univariable Cox Regression — template_coxreg_u • teal.modules.clinical
+
+
+
+
+
+
+Template: Univariable Cox Regression — template_coxreg_u • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Univariable Cox Regression
-
Usage
+
Usage
+
template_coxreg_u (
dataname ,
cov_var ,
@@ -71,96 +109,118 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-cov_var
+cov_var
+
(character
) names of the covariates variables.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-cnsr_var
+cnsr_var
+
(character
) name of the censoring variable.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-at
+at
+
(list
of numeric
) when the candidate covariate is a numeric
type variable, use at
to specify the value of the covariate at which the effect should be estimated.
-strata_var
+strata_var
+
(character
) names of the variables for stratified analysis.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-control
+control
+
(list
) list of settings for the analysis (see tern::control_coxreg()
).
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-append
+append
+
(logical
) whether the result should be appended to the previous one.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_events.html b/main/reference/template_events.html
index ba08da5f6..0ddeb0aea 100644
--- a/main/reference/template_events.html
+++ b/main/reference/template_events.html
@@ -1,5 +1,21 @@
-
-Template: Events by Term — template_events • teal.modules.clinical
+
+
+
+
+
+
+Template: Events by Term — template_events • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Events by Term
-
Usage
+
Usage
+
template_events (
dataname ,
parentname ,
@@ -74,119 +112,144 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-hlt
+hlt
+
(character
) name of the variable with high level term for events.
-llt
+llt
+
(character
) name of the variable with low level term for events.
-label_hlt
+label_hlt
+
(string
) label of the hlt
variable from dataname
. The label will be extracted from the
module.
-label_llt
+label_llt
+
(string
) label of the llt
variable from dataname
. The label will be extracted from the
module.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-event_type
+event_type
+
(character
) type of event that is summarized (e.g. adverse event, treatment). Default
is "event"
.
-sort_criteria
+sort_criteria
+
(character
) how to sort the final table. Default option freq_desc
sorts
on column sort_freq_col
by decreasing number of patients with event. Alternative option alpha
sorts events
alphabetically.
-sort_freq_col
+sort_freq_col
+
(character
) column to sort by frequency on if sort_criteria
is set to freq_desc
.
-prune_freq
+prune_freq
+
(number
) threshold to use for trimming table using event incidence rate in any column.
-prune_diff
+prune_diff
+
(number
) threshold to use for trimming table using as criteria difference in
rates between any two columns.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-incl_overall_sum
+incl_overall_sum
+
(flag
) whether two rows which summarize the overall number of adverse events
should be included at the top of the table.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_events_by_grade.html b/main/reference/template_events_by_grade.html
index 7c2d52f52..37fa3b2ed 100644
--- a/main/reference/template_events_by_grade.html
+++ b/main/reference/template_events_by_grade.html
@@ -1,5 +1,21 @@
-
-Template: Events by Grade — template_events_by_grade • teal.modules.clinical
+
+
+
+
+
+
+Template: Events by Grade — template_events_by_grade • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Events by Grade
-
Usage
+
Usage
+
template_events_by_grade (
dataname ,
parentname ,
@@ -73,112 +111,136 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-id
+id
+
(character
) unique identifier of patients in datasets, default to "USUBJID"
.
-hlt
+hlt
+
(character
) name of the variable with high level term for events.
-llt
+llt
+
(character
) name of the variable with low level term for events.
-label_hlt
+label_hlt
+
(string
) label of the hlt
variable from dataname
. The label will be extracted from the
module.
-label_llt
+label_llt
+
(string
) label of the llt
variable from dataname
. The label will be extracted from the
module.
-grade
+grade
+
(character
) name of the severity level variable.
-label_grade
+label_grade
+
(string
) label of the grade
variable from dataname
. The label will be extracted from the
module.
-prune_freq
+prune_freq
+
(number
) threshold to use for trimming table using event incidence rate in any column.
-prune_diff
+prune_diff
+
(number
) threshold to use for trimming table using as criteria difference in
rates between any two columns.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_events_col_by_grade.html b/main/reference/template_events_col_by_grade.html
index ea72de194..179f970ed 100644
--- a/main/reference/template_events_col_by_grade.html
+++ b/main/reference/template_events_col_by_grade.html
@@ -1,5 +1,21 @@
-
-Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade • teal.modules.clinical
+
+
+
+
+
+
+Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Adverse Events Grouped by Grade with Threshold
-
Usage
+
Usage
+
template_events_col_by_grade (
dataname ,
parentname ,
@@ -75,115 +113,140 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-grading_groups
+grading_groups
+
(list
) named list of grading groups.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-id
+id
+
(character
) name of variable to uniquely identify patients in datasets.
-hlt
+hlt
+
(character
) name of the variable with high level term for events.
-llt
+llt
+
(character
) name of the variable with low level term for events.
-label_hlt
+label_hlt
+
(string
) label of the hlt
variable from dataname
. The label will be extracted from the
module.
-label_llt
+label_llt
+
(string
) label of the llt
variable from dataname
. The label will be extracted from the
module.
-grade
+grade
+
(character
) name of grade variable to base grading_groups
on.
-label_grade
+label_grade
+
(character
) label of the grade
variable from dataname
.
-prune_freq
+prune_freq
+
(number
) threshold to use for trimming table using event incidence rate in any column.
-prune_diff
+prune_diff
+
(number
) threshold to use for trimming table using as criteria difference in
rates between any two columns.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_events_patyear.html b/main/reference/template_events_patyear.html
index 682ef8e26..6f9f9c182 100644
--- a/main/reference/template_events_patyear.html
+++ b/main/reference/template_events_patyear.html
@@ -1,5 +1,21 @@
-
-Template: Event Rates Adjusted for Patient-Years — template_events_patyear • teal.modules.clinical
+
+
+
+
+
+
+Template: Event Rates Adjusted for Patient-Years — template_events_patyear • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Event Rates Adjusted for Patient-Years
-
Usage
+
Usage
+
template_events_patyear (
dataname ,
parentname ,
@@ -68,88 +106,107 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-events_var
+events_var
+
(character
) name of the variable for number of observed events.
-label_paramcd
+label_paramcd
+
(character
)paramcd
variable text to use in the table title.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-control
+control
+
(list
) list of settings for the analysis.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_events_summary.html b/main/reference/template_events_summary.html
index b8e8f6e7a..4ab540832 100644
--- a/main/reference/template_events_summary.html
+++ b/main/reference/template_events_summary.html
@@ -1,5 +1,21 @@
-
-Template: Adverse Events Summary — template_events_summary • teal.modules.clinical
+
+
+
+
+
+
+Template: Adverse Events Summary — template_events_summary • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Adverse Events Summary
-
Usage
+
Usage
+
template_events_summary (
anl_name ,
parentname ,
@@ -73,113 +111,137 @@ Usage
-
Arguments
+
Arguments
+
-
anl_name
+
+anl_name
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-dthfl_var
+dthfl_var
+
(character
) name of variable for subject death flag from parentname
.
Records with "Y"
are summarized in the table row for "Total number of deaths".
-dcsreas_var
+dcsreas_var
+
(character
) name of variable for study discontinuation reason from parentname
.
Records with "ADVERSE EVENTS"
are summarized in the table row for
"Total number of patients withdrawn from study due to an AE".
-flag_var_anl
+flag_var_anl
+
(character
) name of flag variable from dataset
used to count adverse event sub-groups
(e.g. Serious events, Related events, etc.). Variable labels are used as table row names if they exist.
-flag_var_aesi
+flag_var_aesi
+
(character
) name of flag variable from dataset
used to count adverse event special
interest groups. All flag variables must be of type logical
. Variable labels are used as table row names if
they exist.
-aeseq_var
+aeseq_var
+
(character
) name of variable for adverse events sequence number from dataset
. Used for
counting total number of events.
-llt
+llt
+
(character
) name of the variable with low level term for events.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-count_dth
+count_dth
+
(logical
) whether to show count of total deaths (based on dthfl_var
). Defaults to TRUE
.
-count_wd
+count_wd
+
(logical
) whether to show count of patients withdrawn from study due to an adverse event
(based on dcsreas_var
). Defaults to TRUE
.
-count_subj
+count_subj
+
(logical
) whether to show count of unique subjects (based on USUBJID
). Only applies if
event flag variables are provided.
-count_pt
+count_pt
+
(logical
) whether to show count of unique preferred terms (based on llt
). Only applies if
event flag variables are provided.
-count_events
+count_events
+
(logical
) whether to show count of events (based on aeseq_var
). Only applies if event
flag variables are provided.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_exposure.html b/main/reference/template_exposure.html
index 765447cc1..91712132f 100644
--- a/main/reference/template_exposure.html
+++ b/main/reference/template_exposure.html
@@ -1,5 +1,21 @@
-
-Template: Exposure Table for Risk management plan — template_exposure • teal.modules.clinical
+
+
+
+
+
+
+Template: Exposure Table for Risk management plan — template_exposure • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Exposure Table for Risk management plan
-
Usage
+
Usage
+
template_exposure (
parentname ,
dataname ,
@@ -72,104 +110,127 @@ Usage
-
Arguments
+
Arguments
+
-
parentname
+
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-id_var
+id_var
+
(character
) the variable name for subject id.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-paramcd_label
+paramcd_label
+
(character
) the column from the dataname
dataset where the
value will be used to label the argument paramcd
.
-row_by_var
+row_by_var
+
(character
) variable name used to split the values by rows.
-col_by_var
+col_by_var
+
(character
) variable name used to split the values by columns.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-add_total_row
+add_total_row
+
(flag
) whether a "total" level should be added after the others which includes all the
levels that constitute the split. A custom label can be set for this level via the total_row_label
argument.
-total_row_label
+total_row_label
+
(character
) string to display as total row label if row is
enabled (see add_total_row
).
-drop_levels
+drop_levels
+
(flag
) whether empty rows should be removed from the table.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-avalu_var
+avalu_var
+
(character
) name of the analysis value unit variable.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_fit_mmrm.html b/main/reference/template_fit_mmrm.html
index e9c498a41..879cc3750 100644
--- a/main/reference/template_fit_mmrm.html
+++ b/main/reference/template_fit_mmrm.html
@@ -1,5 +1,21 @@
-
-Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm • teal.modules.clinical
+
+
+
+
+
+
+Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Mixed Model Repeated Measurements (MMRM) Analysis
-
Usage
+
Usage
+
template_fit_mmrm (
parentname ,
dataname ,
@@ -93,148 +131,182 @@ Usage
-
Arguments
+
Arguments
+
-
parentname
+
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-id_var
+id_var
+
(character
) the variable name for subject id.
-visit_var
+visit_var
+
(character
) variable names that can be used as visit
variable. Must be a factor in
dataname
.
-cov_var
+cov_var
+
(character
) names of the covariates variables.
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-method
+method
+
(string
) a string specifying the adjustment method.
-cor_struct
+cor_struct
+
(string
) a string specifying the correlation structure, defaults to
"unstructured"
. See tern.mmrm::build_formula()
for more options.
-weights_emmeans
+weights_emmeans
+
argument from emmeans::emmeans()
, "proportional" by default.
-parallel
+parallel
+
(flag
) flag that controls whether optimizer search can use available free cores on the
machine (not default).
-fit_name
+fit_name
+
(string
) name of fitted MMRM object.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-show_relative
+show_relative
+
(string
) should the "reduction" (control - treatment
, default) or the "increase"
(treatment - control
) be shown for the relative change from baseline.
-table_type
+table_type
+
(string
) type of table to output.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-lsmeans_plot
+lsmeans_plot
+
(named list
) a list
of controls for LS means plot.
See more tern.mmrm::g_mmrm_lsmeans()
.
-diagnostic_plot
+diagnostic_plot
+
(named list
) a list
of controls for diagnostic_plot.
See more tern.mmrm::g_mmrm_diagnostic()
.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
-
Functions
+
Functions
+
-
+
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_forest_rsp.html b/main/reference/template_forest_rsp.html
index 3556f78c5..35a77d321 100644
--- a/main/reference/template_forest_rsp.html
+++ b/main/reference/template_forest_rsp.html
@@ -1,5 +1,21 @@
-
-Template: Response Forest Plot — template_forest_rsp • teal.modules.clinical
+
+
+
+
+
+
+Template: Response Forest Plot — template_forest_rsp • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Response Forest Plot
-
Usage
+
Usage
+
template_forest_rsp (
dataname = "ANL" ,
parentname = "ADSL" ,
@@ -73,51 +111,67 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-obj_var_name
+obj_var_name
+
(character
) additional text to append to the table title.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-responders
+responders
+
(character
) values of aval_var
that are considered to be responders.
-subgroup_var
+subgroup_var
+
(character
) with variable names that can be used as subgroups.
-strata_var
+strata_var
+
(character
) names of the variables for stratified analysis.
-stats
-(character
) the names of statistics to be reported among:
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_forest_tte.html b/main/reference/template_forest_tte.html
index 8cb144048..703e952dc 100644
--- a/main/reference/template_forest_tte.html
+++ b/main/reference/template_forest_tte.html
@@ -1,5 +1,21 @@
-
-Template: Survival Forest Plot — template_forest_tte • teal.modules.clinical
+
+
+
+
+
+
+Template: Survival Forest Plot — template_forest_tte • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Survival Forest Plot
-
Usage
+
Usage
+
template_forest_tte (
dataname = "ANL" ,
parentname = "ANL_ADSL" ,
@@ -74,51 +112,67 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-obj_var_name
+obj_var_name
+
(character
) additional text to append to the table title.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-cnsr_var
+cnsr_var
+
(character
) name of the censoring variable.
-subgroup_var
+subgroup_var
+
(character
) with variable names that can be used as subgroups.
-strata_var
+strata_var
+
(character
) names of the variables for stratified analysis.
-stats
-(character
) the names of statistics to be reported among:
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_g_ci.html b/main/reference/template_g_ci.html
index bc2595090..3d07d9db6 100644
--- a/main/reference/template_g_ci.html
+++ b/main/reference/template_g_ci.html
@@ -1,5 +1,21 @@
-
-Template: Confidence Interval Plot — template_g_ci • teal.modules.clinical
+
+
+
+
+
+
+Template: Confidence Interval Plot — template_g_ci • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Confidence Interval Plot
-
Usage
+
Usage
+
template_g_ci (
dataname ,
x_var ,
@@ -64,66 +102,81 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-x_var
+x_var
+
(character
) name of the treatment variable to put on the x-axis.
-y_var
+y_var
+
(character
) name of the response variable to put on the y-axis.
-grp_var
+grp_var
+
(character
) name of the group variable used to determine the plot colors, point shapes,
and line types.
-stat
+stat
+
(character
) statistic to plot. Options are "mean"
and "median"
.
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-unit_var
+unit_var
+
(character
) name of the unit variable.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_g_ipp.html b/main/reference/template_g_ipp.html
index 678553001..b10dfbb8e 100644
--- a/main/reference/template_g_ipp.html
+++ b/main/reference/template_g_ipp.html
@@ -1,5 +1,21 @@
-
-Template: Individual Patient Plots — template_g_ipp • teal.modules.clinical
+
+
+
+
+
+
+Template: Individual Patient Plots — template_g_ipp • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Individual Patient Plots
-
Usage
+
Usage
+
template_g_ipp (
dataname = "ANL" ,
paramcd ,
@@ -73,104 +111,130 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-arm_levels
+arm_levels
+
(character
) vector of all levels of arm_var
.
-avalu_first
+avalu_first
+
(character
)avalu_var
text to append to the plot title and y-axis label if add_avalu
is
TRUE
.
-paramcd_first
+paramcd_first
+
(character
)paramcd
text to append to the plot title and y-axis label.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-avalu_var
+avalu_var
+
(character
) name of the analysis value unit variable.
-id_var
+id_var
+
(character
) the variable name for subject id.
-visit_var
+visit_var
+
(character
) name of the variable for visit timepoints.
-base_var
+base_var
+
Please use the baseline_var
argument instead.
-baseline_var
+baseline_var
+
(character
) name of the variable for baseline values of the analysis variable.
-add_baseline_hline
+add_baseline_hline
+
(logical
) whether a horizontal line should be added to the plot at baseline y-value.
-separate_by_obs
+separate_by_obs
+
(logical
) whether to create multi-panel plots.
-ggplot2_args
-(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
+
ggplot2_args
+
+
+(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. For this module, this argument will only accept ggplot2_args
object with labs
list of
the following child elements: title
, subtitle
, x
, y
. No other elements are taken into account. The
argument is merged with option teal.ggplot2_args
and with default module arguments (hard coded in the module
body).
-For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+
-suppress_legend
+suppress_legend
+
(logical
) whether to suppress the plot legend.
-add_avalu
+add_avalu
+
(logical
) whether avalu_first
text should be appended to the plot title and y-axis label.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_g_km.html b/main/reference/template_g_km.html
index c98986913..af69d5f4e 100644
--- a/main/reference/template_g_km.html
+++ b/main/reference/template_g_km.html
@@ -1,5 +1,21 @@
-
-Template: Kaplan-Meier Plot — template_g_km • teal.modules.clinical
+
+
+
+
+
+
+Template: Kaplan-Meier Plot — template_g_km • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Kaplan-Meier Plot
-
Usage
+
Usage
+
template_g_km (
dataname = "ANL" ,
arm_var = "ARM" ,
@@ -86,166 +124,203 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-compare_arm
+compare_arm
+
(logical
) triggers the comparison between study arms.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-cnsr_var
+cnsr_var
+
(character
) name of the censoring variable.
-xticks
+xticks
+
(numeric
or NULL
) numeric vector of tick positions or a single number with spacing
between ticks on the x-axis. If NULL
(default), labeling::extended()
is used to determine
optimal tick positions on the x-axis.
-strata_var
+strata_var
+
(character
) names of the variables for stratified analysis.
-time_points
+time_points
+
(character
) time points that can be used in tern::surv_timepoint()
.
-facet_var
+facet_var
+
(character
) name of the variable to use to facet the plot.
-font_size
+font_size
+
(numeric
) font size value.
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-ties
+ties
+
(string
) among exact
(equivalent to DISCRETE
in SAS), efron
and breslow
,
see survival::coxph()
. Note: there is no equivalent of SAS EXACT
method in R.
-xlab
+xlab
+
(string
) x-axis label.
-time_unit_var
+time_unit_var
+
(character
) name of the variable representing time units.
-yval
+yval
+
(string
) type of plot, to be plotted on the y-axis. Options are Survival
(default) and Failure
probability.
-ylim
+ylim
+
(numeric(2)
) vector containing lower and upper limits for the y-axis, respectively.
If NULL
(default), the default scale range is used.
-pval_method
+pval_method
+
(string
) the method used for estimation of p.values; wald
(default) or likelihood
.
-annot_surv_med
+annot_surv_med
+
(flag
) compute and add the annotation table on the Kaplan-Meier curve estimating the
median survival time per group.
-annot_coxph
+annot_coxph
+
(flag
) whether to add the annotation table from a survival::coxph()
model.
-control_annot_surv_med
+control_annot_surv_med
+
(list
) parameters to control the position and size of the annotation table added
to the plot when annot_surv_med = TRUE
, specified using the control_surv_med_annot()
function. Parameter
options are: x
, y
, w
, h
, and fill
. See control_surv_med_annot()
for details.
-control_annot_coxph
+control_annot_coxph
+
(list
) parameters to control the position and size of the annotation table added
to the plot when annot_coxph = TRUE
, specified using the control_coxph_annot()
function. Parameter
options are: x
, y
, w
, h
, fill
, and ref_lbls
. See control_coxph_annot()
for details.
-legend_pos
+legend_pos
+
(numeric(2)
or NULL
) vector containing x- and y-coordinates, respectively, for the legend
position relative to the KM plot area. If NULL
(default), the legend is positioned in the bottom right corner of
the plot, or the middle right of the plot if needed to prevent overlapping.
-position_coxph
+position_coxph
+
Please use the x
and y
elements of
control_annot_coxph
instead.
-width_annots
+width_annots
+
Please use the w
element of control_annot_surv_med
(for surv_med
) and control_annot_coxph
(for coxph
)."
-rel_height_plot
+rel_height_plot
+
(proportion
) proportion of total figure height to allocate to the Kaplan-Meier plot.
Relative height of patients at risk table is then 1 - rel_height_plot
. If annot_at_risk = FALSE
or
as_list = TRUE
, this parameter is ignored.
-ci_ribbon
+ci_ribbon
+
(flag
) whether the confidence interval should be drawn around the Kaplan-Meier curve.
-title
+title
+
(character
) title of the output.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_g_lineplot.html b/main/reference/template_g_lineplot.html
index 3c92b8ed9..a5e27ddab 100644
--- a/main/reference/template_g_lineplot.html
+++ b/main/reference/template_g_lineplot.html
@@ -1,5 +1,21 @@
-
-Template: Line Plot — template_g_lineplot • teal.modules.clinical
+
+
+
+
+
+
+Template: Line Plot — template_g_lineplot • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Line Plot
-
Usage
+
Usage
+
template_g_lineplot (
dataname = "ANL" ,
strata = lifecycle :: deprecated ( ) ,
@@ -76,125 +114,154 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-strata
+strata
+
Please use the group_var
argument instead.
-group_var
+group_var
+
(string
or NA
) group variable name.
-x
+x
+
(string
) x-variable name.
-y
+y
+
(string
) y-variable name.
-y_unit
+y_unit
+
(string
or NA
) y-axis unit variable name.
-paramcd
+paramcd
+
(string
or NA
) parameter code variable name.
-param
+param
+
(character
) parameter to filter the data by.
-mid
+mid
+
(character
or NULL
) names of the statistics that will be plotted as midpoints.
All the statistics indicated in mid
variable must be present in the object returned by sfun
,
and be of a double
or numeric
type vector of length one.
-interval
+interval
+
(character
or NULL
) names of the statistics that will be plotted as intervals.
All the statistics indicated in interval
variable must be present in the object returned by sfun
,
and be of a double
or numeric
type vector of length two. Set interval = NULL
if intervals should not be
added to the plot.
-whiskers
+whiskers
+
(character
) names of the interval whiskers that will be plotted. Names must match names
of the list element interval
that will be returned by sfun
(e.g. mean_ci_lwr
element of
sfun(x)[["mean_ci"]]
). It is possible to specify one whisker only, or to suppress all whiskers by setting
interval = NULL
.
-table
+table
+
(character
or NULL
) names of the statistics that will be displayed in the table below the plot.
All the statistics indicated in table
variable must be present in the object returned by sfun
.
-mid_type
+mid_type
+
(string
) controls the type of the mid
plot, it can be point ("p"
), line ("l"
),
or point and line ("pl"
).
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-incl_screen
+incl_screen
+
(logical
) whether the screening visit should be included.
-mid_point_size
+mid_point_size
+
(numeric(1)
) font size of the mid
plot points.
-table_font_size
+table_font_size
+
(numeric(1)
) font size of the text in the table.
-title
+title
+
(string
) plot title.
-y_lab
+y_lab
+
(string
or NULL
) y-axis label. If NULL
then no label will be added.
-ggplot2_args
-(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
+
ggplot2_args
+
+
+(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. For this module, this argument will only accept ggplot2_args
object with labs
list of
following child elements: title
, subtitle
, caption
, y
, lty
. No other elements would be taken into
account. The argument is merged with option teal.ggplot2_args
and with default module arguments (hard coded in
the module body).
-For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_laboratory.html b/main/reference/template_laboratory.html
index 7c9f11909..f563e2b57 100644
--- a/main/reference/template_laboratory.html
+++ b/main/reference/template_laboratory.html
@@ -1,5 +1,21 @@
-
-Template: Patient Profile Laboratory Table — template_laboratory • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Laboratory Table — template_laboratory • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Patient Profile Laboratory Table
-
Usage
+
Usage
+
template_laboratory (
dataname = "ANL" ,
paramcd = "PARAMCD" ,
@@ -67,74 +105,92 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-param
+param
+
(character
) name of the parameter variable.
-anrind
+anrind
+
(character
) name of the analysis reference range indicator variable.
-timepoints
+timepoints
+
(character
) name of time variable.
-aval
+aval
+
Please use the aval_var
argument instead.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-avalu
+avalu
+
Please use the avalu_var
argument instead.
-avalu_var
+avalu_var
+
(character
) name of the analysis value unit variable.
-patient_id
+patient_id
+
(character
) patient ID.
-round_value
+round_value
+
(numeric
) number of decimal places to round to.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_logistic.html b/main/reference/template_logistic.html
index cc484ea71..49f9c89d7 100644
--- a/main/reference/template_logistic.html
+++ b/main/reference/template_logistic.html
@@ -1,5 +1,21 @@
-
-Template: Logistic Regression — template_logistic • teal.modules.clinical
+
+
+
+
+
+
+Template: Logistic Regression — template_logistic • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Logistic Regression
-
Usage
+
Usage
+
template_logistic (
dataname ,
arm_var ,
@@ -71,94 +109,116 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
. To fit a logistic model with no
arm/treatment variable, set to NULL
.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-paramcd
+paramcd
+
The paramcd
argument is not used in this function.
-label_paramcd
+label_paramcd
+
(character
) label of response parameter value to print in the table title.
-cov_var
+cov_var
+
(character
) names of the covariates variables.
-interaction_var
+interaction_var
+
(character
) names of the variables that can be used for interaction variable selection.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-topleft
+topleft
+
(character
) text to use as top-left annotation in the table.
-conf_level
+conf_level
+
(numeric
) value for the confidence level within the range of (0, 1).
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-responder_val
+responder_val
+
(character
) values of the responder variable corresponding with a successful response.
-at
+at
+
(numeric
or NULL
) optional values for the interaction variable. Otherwise the median is used.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_medical_history.html b/main/reference/template_medical_history.html
index 89bae7db5..4e5c750de 100644
--- a/main/reference/template_medical_history.html
+++ b/main/reference/template_medical_history.html
@@ -1,5 +1,21 @@
-
-Template: Patient Profile Medical History — template_medical_history • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Medical History — template_medical_history • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Patient Profile Medical History
-
Usage
+
Usage
+
template_medical_history (
dataname = "ANL" ,
mhterm = "MHTERM" ,
@@ -61,50 +99,62 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-mhterm
+mhterm
+
(character
) name of the reported term for the medical history variable.
-mhbodsys
+mhbodsys
+
(character
) name of the body system or organ class variable.
-mhdistat
+mhdistat
+
(character
) name of the status of the disease variable.
-patient_id
+patient_id
+
(character
) patient ID.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_mult_events.html b/main/reference/template_mult_events.html
index c26465b7f..5d4a3efb1 100644
--- a/main/reference/template_mult_events.html
+++ b/main/reference/template_mult_events.html
@@ -1,5 +1,21 @@
-
-Template: Multiple Events by Term — template_mult_events • teal.modules.clinical
+
+
+
+
+
+
+Template: Multiple Events by Term — template_mult_events • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Multiple Events by Term
-
Usage
+
Usage
+
template_mult_events (
dataname ,
parentname ,
@@ -68,90 +106,109 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-seq_var
+seq_var
+
(character
) name of analysis sequence number variable. Used for counting the unique number
of events.
-hlt
+hlt
+
(character
) name of the variable with high level term for events.
-llt
+llt
+
(character
) name of the variable with low level term for events.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-event_type
+event_type
+
(character
) type of event that is summarized (e.g. adverse event, treatment). Default
is "event"
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_patient_timeline.html b/main/reference/template_patient_timeline.html
index e0ab8f397..8ea6a952c 100644
--- a/main/reference/template_patient_timeline.html
+++ b/main/reference/template_patient_timeline.html
@@ -1,5 +1,21 @@
-
-Template: Patient Profile Timeline Plot — template_patient_timeline • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Timeline Plot — template_patient_timeline • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Patient Profile Timeline Plot
-
Usage
+
Usage
+
template_patient_timeline (
dataname = "ANL" ,
aeterm = "AETERM" ,
@@ -71,93 +109,115 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-aeterm
+aeterm
+
(character
) name of the reported term for the adverse event variable.
-aetime_start
+aetime_start
+
(character
) name of start date/time of adverse event variable.
-aetime_end
+aetime_end
+
(character
) name of end date/time of adverse event variable.
-dstime_start
+dstime_start
+
(character
) name of date/time of first exposure to treatment variable.
-dstime_end
+dstime_end
+
(character
) name of date/time of last exposure to treatment variable.
-cmdecod
+cmdecod
+
(character
) name of standardized medication name variable.
-aerelday_start
+aerelday_start
+
(character
) name of adverse event study start day variable.
-aerelday_end
+aerelday_end
+
(character
) name of adverse event study end day variable.
-dsrelday_start
+dsrelday_start
+
(character
) name of concomitant medications study start day variable.
-dsrelday_end
+dsrelday_end
+
(character
) name of concomitant medications study day start variable.
-relative_day
+relative_day
+
(logical
) whether to use relative days (TRUE
) or absolute dates (FALSE
).
-patient_id
+patient_id
+
(character
) patient ID.
-font_size
+font_size
+
(numeric
) font size value.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_prior_medication.html b/main/reference/template_prior_medication.html
index 5b8beacc6..9c1ca0151 100644
--- a/main/reference/template_prior_medication.html
+++ b/main/reference/template_prior_medication.html
@@ -1,5 +1,21 @@
-
-Template: Patient Profile Prior Medication — template_prior_medication • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Prior Medication — template_prior_medication • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Patient Profile Prior Medication
-
Usage
+
Usage
+
template_prior_medication (
dataname = "ANL" ,
atirel = "ATIREL" ,
@@ -61,50 +99,62 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-atirel
+atirel
+
(character
) name of time relation of medication variable.
-cmdecod
+cmdecod
+
(character
) name of standardized medication name variable.
-cmindc
+cmindc
+
(character
) name of indication variable.
-cmstdy
+cmstdy
+
(character
) name of study relative day of start of medication variable.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_shift_by_arm.html b/main/reference/template_shift_by_arm.html
index 9ce3bc611..9e9f04bf0 100644
--- a/main/reference/template_shift_by_arm.html
+++ b/main/reference/template_shift_by_arm.html
@@ -1,5 +1,21 @@
-
-Template: Shift by Arm — template_shift_by_arm • teal.modules.clinical
+
+
+
+
+
+
+Template: Shift by Arm — template_shift_by_arm • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Shift by Arm
-
Usage
+
Usage
+
template_shift_by_arm (
dataname ,
parentname ,
@@ -71,99 +109,121 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-visit_var
+visit_var
+
(character
) variable names that can be used as visit
variable. Must be a factor in
dataname
.
-treatment_flag_var
+treatment_flag_var
+
(character
) name of the on treatment flag variable.
-treatment_flag
+treatment_flag
+
(character
) name of the value indicating on treatment
records in treatment_flag_var
.
-aval_var
+aval_var
+
(character
) name of the analysis reference range indicator variable.
-base_var
+base_var
+
Please use the baseline_var
argument instead.
-baseline_var
+baseline_var
+
(character
) name of the baseline reference range indicator variable.
-na.rm
+na.rm
+
(logical
) whether NA
values should be removed prior to analysis.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-add_total
+add_total
+
(logical
) whether to include row with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_shift_by_arm_by_worst.html b/main/reference/template_shift_by_arm_by_worst.html
index b275c4a8e..8db1ba9e1 100644
--- a/main/reference/template_shift_by_arm_by_worst.html
+++ b/main/reference/template_shift_by_arm_by_worst.html
@@ -1,5 +1,21 @@
-
-Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst • teal.modules.clinical
+
+
+
+
+
+
+Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Shift by Arm by Worst Analysis Indicator Level
-
Usage
+
Usage
+
template_shift_by_arm_by_worst (
dataname ,
parentname ,
@@ -72,102 +110,125 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-worst_flag_var
+worst_flag_var
+
(character
) name of the worst flag variable.
-worst_flag
+worst_flag
+
(character
) value indicating worst analysis indicator level.
-treatment_flag_var
+treatment_flag_var
+
(character
) name of the on treatment flag variable.
-treatment_flag
+treatment_flag
+
(character
) name of the value indicating on treatment
records in treatment_flag_var
.
-aval_var
+aval_var
+
(character
) name of the analysis reference range indicator variable.
-base_var
+base_var
+
Please use the baseline_var
argument instead.
-baseline_var
+baseline_var
+
(character
) name of the baseline reference range indicator variable.
-na.rm
+na.rm
+
(logical
) whether NA
values should be removed prior to analysis.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-add_total
+add_total
+
(logical
) whether to include row with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_shift_by_grade.html b/main/reference/template_shift_by_grade.html
index 6bcac8589..5ee3ec9cf 100644
--- a/main/reference/template_shift_by_grade.html
+++ b/main/reference/template_shift_by_grade.html
@@ -1,5 +1,21 @@
-
-Template: Grade Summary Table — template_shift_by_grade • teal.modules.clinical
+
+
+
+
+
+
+Template: Grade Summary Table — template_shift_by_grade • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Grade Summary Table
-
Usage
+
Usage
+
template_shift_by_grade (
parentname ,
dataname ,
@@ -72,105 +110,128 @@ Usage
-
Arguments
+
Arguments
+
-
parentname
+
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-id_var
+id_var
+
(character
) the variable name for subject id.
-visit_var
+visit_var
+
(character
) variable names that can be used as visit
variable. Must be a factor in
dataname
.
-worst_flag_var
+worst_flag_var
+
(character
) name of the worst flag variable.
-worst_flag_indicator
+worst_flag_indicator
+
(character
) value indicating worst grade.
-anl_toxgrade_var
+anl_toxgrade_var
+
(character
) name of the variable indicating the analysis toxicity grade.
-base_toxgrade_var
+base_toxgrade_var
+
(character
) name of the variable indicating the baseline toxicity grade.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-code_missing_baseline
+code_missing_baseline
+
(logical
) whether missing baseline grades should be counted as grade 0.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_smq.html b/main/reference/template_smq.html
index 1faaa1b1f..6e0fea497 100644
--- a/main/reference/template_smq.html
+++ b/main/reference/template_smq.html
@@ -1,5 +1,21 @@
-
-Template: Adverse Events Table by Standardized MedDRA Query — template_smq • teal.modules.clinical
+
+
+
+
+
+
+Template: Adverse Events Table by Standardized MedDRA Query — template_smq • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Adverse Events Table by Standardized MedDRA Query
-
Usage
+
Usage
+
template_smq (
dataname ,
parentname ,
@@ -69,94 +107,114 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-llt
+llt
+
(character
) name of the variable with low level term for events.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-sort_criteria
+sort_criteria
+
(character
) how to sort the final table. Default option freq_desc
sorts
on column sort_freq_col
by decreasing number of patients with event. Alternative option alpha
sorts events
alphabetically.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-smq_varlabel
+smq_varlabel
+
(character
) label to use for new column SMQ
created by tern::h_stack_by_baskets()
.
-baskets
+baskets
+
(character
) names of the selected standardized/customized queries variables.
-id_var
+id_var
+
(character
) the variable name for subject id.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_summary.html b/main/reference/template_summary.html
index 652707d05..023e323e8 100644
--- a/main/reference/template_summary.html
+++ b/main/reference/template_summary.html
@@ -1,5 +1,21 @@
-
-Template: Summary of Variables — template_summary • teal.modules.clinical
+
+
+
+
+
+
+Template: Summary of Variables — template_summary • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Summary of Variables
-
Usage
+
Usage
+
template_summary (
dataname ,
parentname ,
@@ -72,105 +110,127 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-sum_vars
+sum_vars
+
(character
) names of the variables that should be summarized.
-show_labels
+show_labels
+
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-var_labels
+var_labels
+
(named character
) optional variable labels for relabeling the analysis variables.
-arm_var_labels
+arm_var_labels
+
(character
or NULL
) vector of column variable labels to display, of the same length as
arm_var
. If NULL
, no labels will be displayed.
-na.rm
+na.rm
+
(logical
) whether NA
values should be removed prior to analysis.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-numeric_stats
+numeric_stats
+
(character
) names of statistics to display for numeric summary variables. Available
statistics are n
, mean_sd
, mean_ci
, median
, median_ci
, quantiles
, range
, and geom_mean
.
-denominator
+denominator
+
(character
) chooses how percentages are calculated. With option N
, the reference
population from the column total is used as the denominator. With option n
, the number of non-missing
records in this row and column intersection is used as the denominator. If omit
is chosen, then the
percentage is omitted.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_summary_by.html b/main/reference/template_summary_by.html
index d10765d65..5ff337d6d 100644
--- a/main/reference/template_summary_by.html
+++ b/main/reference/template_summary_by.html
@@ -1,5 +1,21 @@
-
-Template: Summarize Variables by Row Groups Module — template_summary_by • teal.modules.clinical
+
+
+
+
+
+
+Template: Summarize Variables by Row Groups Module — template_summary_by • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Summarize Variables by Row Groups Module
-
Usage
+
Usage
+
template_summary_by (
parentname ,
dataname ,
@@ -75,117 +113,142 @@ Usage
-
Arguments
+
Arguments
+
-
parentname
+
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-id_var
+id_var
+
(character
) the variable name for subject id.
-sum_vars
+sum_vars
+
(character
) names of the variables that should be summarized.
-by_vars
+by_vars
+
(character
) variable names used to split the summary by rows.
-var_labels
+var_labels
+
(named character
) optional variable labels for relabeling the analysis variables.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-parallel_vars
+parallel_vars
+
(logical
) whether summarized variables should be arranged in columns. Can only be set to
TRUE
if all chosen analysis variables are numeric.
-row_groups
+row_groups
+
(logical
) whether summarized variables should be arranged in row groups.
-na.rm
+na.rm
+
(logical
) whether NA
values should be removed prior to analysis.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-numeric_stats
+numeric_stats
+
(character
) names of statistics to display for numeric summary variables. Available
statistics are n
, mean_sd
, mean_ci
, median
, median_ci
, quantiles
, range
, and geom_mean
.
-denominator
+denominator
+
(character
) chooses how percentages are calculated. With option N
, the reference
population from the column total is used as the denominator. With option n
, the number of non-missing
records in this row and column intersection is used as the denominator. If omit
is chosen, then the
percentage is omitted.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-drop_zero_levels
+drop_zero_levels
+
(logical
) whether rows with zero counts in all columns should be removed from the table.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_therapy.html b/main/reference/template_therapy.html
index fbea6e5f6..2de0137e1 100644
--- a/main/reference/template_therapy.html
+++ b/main/reference/template_therapy.html
@@ -1,7 +1,23 @@
-
-Template: Patient Profile Therapy Table and Plot — template_therapy • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Therapy Table and Plot — template_therapy • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -53,7 +90,8 @@ Template: Patient Profile Therapy Table and Plot
-
Usage
+
Usage
+
template_therapy (
dataname = "ANL" ,
atirel = "ATIREL" ,
@@ -73,89 +111,110 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-atirel
+atirel
+
(character
) name of time relation of medication variable.
-cmdecod
+cmdecod
+
(character
) name of standardized medication name variable.
-cmindc
+cmindc
+
(character
) name of indication variable.
-cmdose
+cmdose
+
(character
) name of dose per administration variable.
-cmtrt
+cmtrt
+
(character
) name of reported name of drug, med, or therapy variable.
-cmdosu
+cmdosu
+
(character
) name of dose units variable.
-cmroute
+cmroute
+
(character
) name of route of administration variable.
-cmdosfrq
+cmdosfrq
+
(character
) name of dosing frequency per interval variable.
-cmstdy
+cmstdy
+
(character
) name of study relative day of start of medication variable.
-cmendy
+cmendy
+
(character
) name of study day of end of medication variable.
-patient_id
+patient_id
+
(character
) patient ID.
-font_size
+font_size
+
(numeric
) font size value.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_tte.html b/main/reference/template_tte.html
index c17f4df0b..2fd81d399 100644
--- a/main/reference/template_tte.html
+++ b/main/reference/template_tte.html
@@ -1,5 +1,21 @@
-
-Template: Time-To-Event — template_tte • teal.modules.clinical
+
+
+
+
+
+
+Template: Time-To-Event — template_tte • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Time-To-Event
-
Usage
+
Usage
+
template_tte (
dataname = "ANL" ,
parentname = "ADSL" ,
@@ -75,113 +113,139 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(character
) variable names that can be used as arm_var
.
-paramcd
+paramcd
+
(character
) endpoint parameter value to use in the table title.
-ref_arm
+ref_arm
+
(character
) the level of reference arm in case of arm comparison.
-comp_arm
+comp_arm
+
(character
) the level of comparison arm in case of arm comparison.
-compare_arm
+compare_arm
+
(logical
) triggers the comparison between study arms.
-combine_comp_arms
+combine_comp_arms
+
(logical
) triggers the combination of comparison arms.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-cnsr_var
+cnsr_var
+
(character
) name of the censoring variable.
-strata_var
+strata_var
+
(character
) names of the variables for stratified analysis.
-time_points
+time_points
+
(character
) time points that can be used in tern::surv_timepoint()
.
-time_unit_var
+time_unit_var
+
(character
) name of the variable representing time units.
-event_desc_var
+event_desc_var
+
(character
) name of the variable with events description.
-control
+control
+
(list
) list of settings for the analysis. See control_tte()
for details.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/template_vitals.html b/main/reference/template_vitals.html
index 68869d4fc..aed41b2ec 100644
--- a/main/reference/template_vitals.html
+++ b/main/reference/template_vitals.html
@@ -1,5 +1,21 @@
-
-Template: Patient Profile Vitals Plot — template_vitals • teal.modules.clinical
+
+
+
+
+
+
+Template: Patient Profile Vitals Plot — template_vitals • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Template: Patient Profile Vitals Plot
-
Usage
+
Usage
+
template_vitals (
dataname = "ANL" ,
paramcd = "PARAMCD" ,
@@ -65,69 +103,85 @@ Usage
-
Arguments
+
Arguments
+
-
dataname
+
+dataname
+
(character
) analysis data used in teal module.
-paramcd
+paramcd
+
(character
) name of the parameter code variable.
-paramcd_levels
+paramcd_levels
+
(character
) vector of all levels of paramcd
.
-xaxis
+xaxis
+
(character
) name of the time variable to put on the x-axis.
-aval
+aval
+
Please use the aval_var
argument instead.
-aval_var
+aval_var
+
(character
) name of the analysis value variable.
-patient_id
+patient_id
+
(character
) patient ID.
-font_size
+font_size
+
(numeric
) font size value.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-
+
+
-
Value
+
Value
+
a list
of expressions to generate a table or plot object.
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_a_gee.html b/main/reference/tm_a_gee.html
index c53ad0cd7..787f2ee5c 100644
--- a/main/reference/tm_a_gee.html
+++ b/main/reference/tm_a_gee.html
@@ -1,5 +1,21 @@
-
-teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Generalized Estimating Equations (GEE) analysis
-
Usage
+
Usage
+
tm_a_gee (
label ,
dataname ,
@@ -73,49 +111,60 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-visit_var
+visit_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as visit
variable.
Must be a factor in dataname
.
-cov_var
+cov_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the covariates variables.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -123,73 +172,92 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
library ( dplyr )
#>
#> Attaching package: ‘dplyr’
@@ -247,17 +315,19 @@
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_a_mmrm.html b/main/reference/tm_a_mmrm.html
index b25f95097..d611d89ff 100644
--- a/main/reference/tm_a_mmrm.html
+++ b/main/reference/tm_a_mmrm.html
@@ -1,5 +1,21 @@
-
-teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Mixed Model Repeated Measurements (MMRM) Analysis
-
Usage
+
Usage
+
tm_a_mmrm (
label ,
dataname ,
@@ -79,49 +117,60 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-visit_var
+visit_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as visit
variable.
Must be a factor in dataname
.
-cov_var
+cov_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the covariates variables.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -129,55 +178,65 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-method
+method
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the adjustment method.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings for all the plots or named list of ggplot2_args
objects for plot-specific settings.
List names should match the following: c("default", "lsmeans", "diagnostic")
. The argument is merged
@@ -185,42 +244,54 @@
Argumentsvignette("custom-ggplot2-arguments", package = "teal.widgets") .
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Note
+
Note
+
The ordering of the input data sets can lead to slightly different numerical results or
different convergence behavior. This is a known observation with the used package
lme4
. However, once convergence is achieved, the results are reliable up to
numerical precision.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
lsmeans_plot
(ggplot2
)
+This module generates the following objects, which can be modified in place using decorators:
+Decorators can be applied to all outputs or only to specific objects using a
+
+
Decorators can be applied to all outputs or only to specific objects using a
named list of teal_transform_module
objects.
The "default"
name is reserved for decorators that are applied to all outputs.
See code snippet below:
-
tm_a_mrmm (
+
+
+
tm_a_mrmm (
..., # arguments for module
decorators = list (
default = list (teal_transform_module (...)), # applied to all outputs
@@ -231,26 +302,33 @@ Decorating Module fixed_effects_table = list (teal_transform_module (...)) # applied only to `fixed_effects_table` output
diagnostic_table = list (teal_transform_module (...)) # applied only to `diagnostic_table` output
)
- )
+ )
+
+
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_barchart_simple.html b/main/reference/tm_g_barchart_simple.html
index 84c8ae351..41e9b4779 100644
--- a/main/reference/tm_g_barchart_simple.html
+++ b/main/reference/tm_g_barchart_simple.html
@@ -1,5 +1,21 @@
-
-teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Simple Bar Chart and Table of Counts per Category
-
Usage
+
Usage
+
tm_g_barchart_simple (
x = NULL ,
fill = NULL ,
@@ -68,105 +106,133 @@ Usage
-
Arguments
+
Arguments
+
-
x
+
+x
+
(data_extract_spec
) variable on the x-axis.
-fill
+fill
+
(data_extract_spec
) grouping variable to determine bar colors.
-x_facet
+x_facet
+
(data_extract_spec
) row-wise faceting groups.
-y_facet
+y_facet
+
(data_extract_spec
) column-wise faceting groups.
-label
+label
+
(character
) menu item label of the module in the teal app.
-plot_options
+plot_options
+
(list
) list of plot options.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Details
+
Details
+
Categories can be defined up to four levels deep and are defined through the x
, fill
,
x_facet
, and y_facet
parameters. Any parameters set to NULL
(default) are ignored.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_ci.html b/main/reference/tm_g_ci.html
index 207a6ae84..0db9d8b21 100644
--- a/main/reference/tm_g_ci.html
+++ b/main/reference/tm_g_ci.html
@@ -1,7 +1,23 @@
-
-teal Module: Confidence Interval Plot — tm_g_ci • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Confidence Interval Plot — tm_g_ci • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -53,7 +90,8 @@ teal Module: Confidence Interval Plot
-
Usage
+
Usage
+
tm_g_ci (
label ,
x_var ,
@@ -72,101 +110,128 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-x_var
+x_var
+
(character
) name of the treatment variable to put on the x-axis.
-y_var
+y_var
+
(character
) name of the response variable to put on the y-axis.
-color
+color
+
(data_extract_spec
) the group variable used to determine the plot colors, shapes, and line types.
-stat
+stat
+
(character
) statistic to plot. Options are "mean"
and "median"
.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_forest_rsp.html b/main/reference/tm_g_forest_rsp.html
index 4109c13ab..75e48d13f 100644
--- a/main/reference/tm_g_forest_rsp.html
+++ b/main/reference/tm_g_forest_rsp.html
@@ -1,5 +1,21 @@
-
-teal Module: Forest Response Plot — tm_g_forest_rsp • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Forest Response Plot — tm_g_forest_rsp • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Forest Response Plot
-
Usage
+
Usage
+
tm_g_forest_rsp (
label ,
dataname ,
@@ -82,28 +120,35 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -111,28 +156,36 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-subgroup_var
+subgroup_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as the default subgroups.
-strata_var
+strata_var
+
(teal.transform::choices_selected()
) names of
the variables for stratified analysis.
-stats
-(character
) the names of statistics to be reported among:
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_forest_tte.html b/main/reference/tm_g_forest_tte.html
index 413fe14d3..cb783e63f 100644
--- a/main/reference/tm_g_forest_tte.html
+++ b/main/reference/tm_g_forest_tte.html
@@ -1,5 +1,21 @@
-
-teal Module: Forest Survival Plot — tm_g_forest_tte • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Forest Survival Plot — tm_g_forest_tte • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Forest Survival Plot
-
Usage
+
Usage
+
tm_g_forest_tte (
label ,
dataname ,
@@ -85,28 +123,35 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -114,33 +159,42 @@
Argumentssubgroup_var
+subgroup_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as the default subgroups.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-strata_var
+strata_var
+
(teal.transform::choices_selected()
) names of
the variables for stratified analysis.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-cnsr_var
+cnsr_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the censoring variable.
-stats
-(character
) the names of statistics to be reported among:
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_ipp.html b/main/reference/tm_g_ipp.html
index 14d9841d6..d9d3c89bd 100644
--- a/main/reference/tm_g_ipp.html
+++ b/main/reference/tm_g_ipp.html
@@ -1,7 +1,23 @@
-
-teal Module: Individual Patient Plots — tm_g_ipp • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Individual Patient Plots — tm_g_ipp • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -53,7 +90,8 @@ teal Module: Individual Patient Plots
-
Usage
+
Usage
+
tm_g_ipp (
label ,
dataname ,
@@ -87,146 +125,184 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable values that can be used as arm variable.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-visit_var
+visit_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as visit
variable.
Must be a factor in dataname
.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-avalu_var
+avalu_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for the analysis unit variable.
-base_var
+base_var
+
Please use the baseline_var
argument instead.
-baseline_var
+baseline_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable values that can be used as baseline_var
.
-add_baseline_hline
+add_baseline_hline
+
(logical
) whether a horizontal line should be added to the plot at baseline y-value.
-separate_by_obs
+separate_by_obs
+
(logical
) whether to create multi-panel plots.
-suppress_legend
+suppress_legend
+
(logical
) whether to suppress the plot legend.
-add_avalu
+add_avalu
+
(logical
) whether avalu_first
text should be appended to the plot title and y-axis label.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
-(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
+
ggplot2_args
+
+
+(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. For this module, this argument will only accept ggplot2_args
object with labs
list of
the following child elements: title
, subtitle
, x
, y
. No other elements are taken into account. The
argument is merged with option teal.ggplot2_args
and with default module arguments (hard coded in the module
body).
-For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_km.html b/main/reference/tm_g_km.html
index 9483d464a..7383cc58c 100644
--- a/main/reference/tm_g_km.html
+++ b/main/reference/tm_g_km.html
@@ -1,5 +1,21 @@
-
-teal Module: Kaplan-Meier Plot — tm_g_km • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Kaplan-Meier Plot — tm_g_km • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Kaplan-Meier Plot
-
Usage
+
Usage
+
tm_g_km (
label ,
dataname ,
@@ -84,28 +122,35 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -113,129 +158,159 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-strata_var
+strata_var
+
(teal.transform::choices_selected()
) names of
the variables for stratified analysis.
-facet_var
+facet_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for names of variable that can be used for plot faceting.
-time_unit_var
+time_unit_var
+
(teal.transform::choices_selected()
) object
with all available choices and pre-selected option for the time unit variable.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-cnsr_var
+cnsr_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the censoring variable.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-font_size
+font_size
+
(numeric
) numeric vector of length 3 of current, minimum and maximum font size values.
-control_annot_surv_med
+control_annot_surv_med
+
(list
) parameters to control the position and size of the annotation table added
to the plot when annot_surv_med = TRUE
, specified using the control_surv_med_annot()
function. Parameter
options are: x
, y
, w
, h
, and fill
. See control_surv_med_annot()
for details.
-control_annot_coxph
+control_annot_coxph
+
(list
) parameters to control the position and size of the annotation table added
to the plot when annot_coxph = TRUE
, specified using the control_coxph_annot()
function. Parameter
options are: x
, y
, w
, h
, fill
, and ref_lbls
. See control_coxph_annot()
for details.
-legend_pos
+legend_pos
+
(numeric(2)
or NULL
) vector containing x- and y-coordinates, respectively, for the legend
position relative to the KM plot area. If NULL
(default), the legend is positioned in the bottom right corner of
the plot, or the middle right of the plot if needed to prevent overlapping.
-rel_height_plot
+rel_height_plot
+
(proportion
) proportion of total figure height to allocate to the Kaplan-Meier plot.
Relative height of patients at risk table is then 1 - rel_height_plot
. If annot_at_risk = FALSE
or
as_list = TRUE
, this parameter is ignored.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_lineplot.html b/main/reference/tm_g_lineplot.html
index 661267dfc..1e744b5d0 100644
--- a/main/reference/tm_g_lineplot.html
+++ b/main/reference/tm_g_lineplot.html
@@ -1,5 +1,21 @@
-
-teal Module: Line Plot — tm_g_lineplot • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Line Plot — tm_g_lineplot • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Line Plot
-
Usage
+
Usage
+
tm_g_lineplot (
label ,
dataname ,
@@ -88,162 +126,203 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-strata
+strata
+
Please use the group_var
argument instead.
-group_var
+group_var
+
(string
or NA
) group variable name.
-x
+x
+
(string
) x-variable name.
-y
+y
+
(string
) y-variable name.
-y_unit
+y_unit
+
(string
or NA
) y-axis unit variable name.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-param
+param
+
(character
) parameter to filter the data by.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-interval
+interval
+
(character
or NULL
) names of the statistics that will be plotted as intervals.
All the statistics indicated in interval
variable must be present in the object returned by sfun
,
and be of a double
or numeric
type vector of length two. Set interval = NULL
if intervals should not be
added to the plot.
-mid
+mid
+
(character
or NULL
) names of the statistics that will be plotted as midpoints.
All the statistics indicated in mid
variable must be present in the object returned by sfun
,
and be of a double
or numeric
type vector of length one.
-whiskers
+whiskers
+
(character
) names of the interval whiskers that will be plotted. Names must match names
of the list element interval
that will be returned by sfun
(e.g. mean_ci_lwr
element of
sfun(x)[["mean_ci"]]
). It is possible to specify one whisker only, or to suppress all whiskers by setting
interval = NULL
.
-table
+table
+
(character
or NULL
) names of the statistics that will be displayed in the table below the plot.
All the statistics indicated in table
variable must be present in the object returned by sfun
.
-mid_type
+mid_type
+
(string
) controls the type of the mid
plot, it can be point ("p"
), line ("l"
),
or point and line ("pl"
).
-mid_point_size
+mid_point_size
+
(numeric(1)
) font size of the mid
plot points.
-table_font_size
+table_font_size
+
(numeric(1)
) font size of the text in the table.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
-(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
+
ggplot2_args
+
+
+(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. For this module, this argument will only accept ggplot2_args
object with labs
list of
following child elements: title
, subtitle
, caption
, y
, lty
. No other elements would be taken into
account. The argument is merged with option teal.ggplot2_args
and with default module arguments (hard coded in
the module body).
-For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
+
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_pp_adverse_events.html b/main/reference/tm_g_pp_adverse_events.html
index 0fe52224a..d41f649e8 100644
--- a/main/reference/tm_g_pp_adverse_events.html
+++ b/main/reference/tm_g_pp_adverse_events.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Adverse Events Table and Plot
-
Usage
+
Usage
+
tm_g_pp_adverse_events (
label ,
dataname = "ADAE" ,
@@ -74,139 +112,175 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-aeterm
+aeterm
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AETERM
variable from dataname
.
-tox_grade
+tox_grade
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AETOXGR
variable from dataname
.
-causality
+causality
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AEREL
variable from dataname
.
-outcome
+outcome
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AEOUT
variable from dataname
.
-action
+action
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AEACN
variable from dataname
.
-time
+time
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the ASTDY
variable from dataname
.
-decod
+decod
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AEDECOD
variable from dataname
.
-font_size
+font_size
+
(numeric
) numeric vector of length 3 of current, minimum and maximum font size values.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Modules
+
Decorating Modules
+
-
This module generates the following objects, which can be modified in place using decorators::
plot
(ggplot2
)
+This module generates the following objects, which can be modified in place using decorators::
+Decorators can be applied to all outputs or only to specific objects using a
+
+
Decorators can be applied to all outputs or only to specific objects using a
named list of teal_transform_module
objects.
The "default"
name is reserved for decorators that are applied to all outputs.
See code snippet below:
-
tm_g_pp_adverse_events (
+
+
+
tm_g_pp_adverse_events (
..., # arguments for module
decorators = list (
default = list (teal_transform_module (...)), # applied to all outputs
plot = list (teal_transform_module (...)), # applied only to `plot` output
table = list (teal_transform_module (...)) # applied only to `table` output
)
- )
+ )
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_pp_patient_timeline.html b/main/reference/tm_g_pp_patient_timeline.html
index 61fe72e25..54eea97d7 100644
--- a/main/reference/tm_g_pp_patient_timeline.html
+++ b/main/reference/tm_g_pp_patient_timeline.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Timeline Plot
-
Usage
+
Usage
+
tm_g_pp_patient_timeline (
label ,
dataname_adcm = "ADCM" ,
@@ -78,145 +116,181 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname_adcm
+dataname_adcm
+
(character
) name of ADCM
dataset or equivalent.
-dataname_adae
+dataname_adae
+
(character
) name of ADAE
dataset or equivalent.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-aeterm
+aeterm
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AETERM
variable from dataname
.
-cmdecod
+cmdecod
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMDECOD
variable from dataname_adcm
.
-aetime_start
+aetime_start
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for the ASTDTM
variable from dataname_adae
.
-aetime_end
+aetime_end
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the AENDTM
variable from dataname_adae
.
-dstime_start
+dstime_start
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for the CMASTDTM
variable from dataname_adcm
.
-dstime_end
+dstime_end
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMAENDTM
variable from dataname_adcm
.
-aerelday_start
+aerelday_start
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for the ASTDY
variable from dataname_adae
.
-aerelday_end
+aerelday_end
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for the AENDY
variable from dataname_adae
.
-dsrelday_start
+dsrelday_start
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for the ASTDY
variable from dataname_adcm
.
-dsrelday_end
+dsrelday_end
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for the AENDY
variable from dataname_adcm
.
-font_size
+font_size
+
(numeric
) numeric vector of length 3 of current, minimum and maximum font size values.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_pp_therapy.html b/main/reference/tm_g_pp_therapy.html
index 94df82b7e..02e794307 100644
--- a/main/reference/tm_g_pp_therapy.html
+++ b/main/reference/tm_g_pp_therapy.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Therapy Table and Plot
-
Usage
+
Usage
+
tm_g_pp_therapy (
label ,
dataname = "ADCM" ,
@@ -77,154 +115,193 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-atirel
+atirel
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the ATIREL
variable from dataname
.
-cmdecod
+cmdecod
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMDECOD
variable from dataname
.
-cmindc
+cmindc
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMINDC
variable from dataname
.
-cmdose
+cmdose
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMDOSE
variable from dataname
.
-cmtrt
+cmtrt
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMTRT
variable from dataname
.
-cmdosu
+cmdosu
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMDOSU
variable from dataname
.
-cmroute
+cmroute
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMROUTE
variable from dataname
.
-cmdosfrq
+cmdosfrq
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMDOSFRQ
variable from dataname
.
-cmstdy
+cmstdy
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMSTDY
variable from dataname
.
-cmendy
+cmendy
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMENDY
variable from dataname
.
-font_size
+font_size
+
(numeric
) numeric vector of length 3 of current, minimum and maximum font size values.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators::
plot
(ggplot2
)
+This module generates the following objects, which can be modified in place using decorators::
+Decorators can be applied to all outputs or only to specific objects using a
+
+
Decorators can be applied to all outputs or only to specific objects using a
named list of teal_transform_module
objects.
The "default"
name is reserved for decorators that are applied to all outputs.
See code snippet below:
-
tm_g_pp_therapy (
+
+
+
tm_g_pp_therapy (
..., # arguments for module
decorators = list (
default = list (teal_transform_module (...)), # applied to all outputs
plot = list (teal_transform_module (...)), # applied only to `plot` output
table = list (teal_transform_module (...)) # applied only to `table` output
)
- )
+ )
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_g_pp_vitals.html b/main/reference/tm_g_pp_vitals.html
index 076d2fa07..8a0835bb1 100644
--- a/main/reference/tm_g_pp_vitals.html
+++ b/main/reference/tm_g_pp_vitals.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Vitals Plot
-
Usage
+
Usage
+
tm_g_pp_vitals (
label ,
dataname = "ADVS" ,
@@ -71,115 +109,145 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-aval
+aval
+
Please use the aval_var
argument instead.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-xaxis
+xaxis
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the time variable from dataname
to be put on the plot x-axis.
-font_size
+font_size
+
(numeric
) numeric vector of length 3 of current, minimum and maximum font size values.
-plot_height
+plot_height
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the
height of the main plot and renders a slider on the plot to interactively adjust the plot height.
-plot_width
+plot_width
+
(numeric
) optional vector of length three with c(value, min, max)
. Specifies the width
of the main plot and renders a slider on the plot to interactively adjust the plot width.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-ggplot2_args
+ggplot2_args
+
(ggplot2_args
) optional object created by teal.widgets::ggplot2_args()
with settings
for the module plot. The argument is merged with option teal.ggplot2_args
and with default module arguments
(hard coded in the module body).
For more details, see the vignette: vignette("custom-ggplot2-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Details
+
Details
+
This plot supports horizontal lines for the following 6 PARAMCD
levels when they are present in dataname
:
"SYSBP"
, "DIABP"
, "TEMP"
, "RESP"
, "OXYSAT"
.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_abnormality.html b/main/reference/tm_t_abnormality.html
index d7d8f4852..15419a387 100644
--- a/main/reference/tm_t_abnormality.html
+++ b/main/reference/tm_t_abnormality.html
@@ -1,5 +1,21 @@
-
-teal Module: Abnormality Summary Table — tm_t_abnormality • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Abnormality Summary Table — tm_t_abnormality • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Abnormality Summary Table
-
Usage
+
Usage
+
tm_t_abnormality (
label ,
dataname ,
@@ -82,149 +120,185 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-by_vars
+by_vars
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names used to split the summary by rows.
-grade
+grade
+
(teal.transform::choices_selected()
)
object with all available choices and preselected option for variable names that can be used to
specify the abnormality grade. Variable must be factor.
-abnormal
+abnormal
+
(named list
) defined by user to indicate what abnormalities are to be displayed.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-baseline_var
+baseline_var
+
(teal.transform::choices_selected()
)
variable for baseline abnormality grade.
-treatment_flag_var
+treatment_flag_var
+
(teal.transform::choices_selected()
) on
treatment flag variable.
-treatment_flag
+treatment_flag
+
(teal.transform::choices_selected()
) value
indicating on treatment records in treatment_flag_var
.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-exclude_base_abn
+exclude_base_abn
+
(logical
) whether to exclude patients who had abnormal values at baseline.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-na_level
+na_level
+
(character
) the NA level in the input dataset, default to "<Missing>"
.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Note
+
Note
+
Patients with the same abnormality at baseline as on the treatment visit can be
excluded in accordance with GDSR specifications by using exclude_base_abn
.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_abnormality_by_worst_grade.html b/main/reference/tm_t_abnormality_by_worst_grade.html
index 97d09333b..09ff4e7a1 100644
--- a/main/reference/tm_t_abnormality_by_worst_grade.html
+++ b/main/reference/tm_t_abnormality_by_worst_grade.html
@@ -1,5 +1,21 @@
-
-teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Laboratory test results with highest grade post-baseline
-
Usage
+
Usage
+
tm_t_abnormality_by_worst_grade (
label ,
dataname ,
@@ -81,133 +119,165 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-atoxgr_var
+atoxgr_var
+
(teal.transform::choices_selected()
)
object with all available choices and preselected option
for variable names that can be used as Analysis Toxicity Grade.
-worst_high_flag_var
+worst_high_flag_var
+
(teal.transform::choices_selected()
)
object with all available choices and preselected option for variable names that can be used as Worst High
Grade flag.
-worst_low_flag_var
+worst_low_flag_var
+
(teal.transform::choices_selected()
)
object with all available choices and preselected option for variable names that can be used as Worst Low Grade flag.
-worst_flag_indicator
+worst_flag_indicator
+
(teal.transform::choices_selected()
)
value indicating worst grade.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_ancova.html b/main/reference/tm_t_ancova.html
index 6fe8bab1c..3d4f6e04e 100644
--- a/main/reference/tm_t_ancova.html
+++ b/main/reference/tm_t_ancova.html
@@ -1,9 +1,25 @@
-
-teal Module: ANCOVA Summary — tm_t_ancova • teal.modules.clinical
+
+
+
+
+
+teal Module: ANCOVA Summary — tm_t_ancova • teal.modules.clinical
+
+
+
+
+
+
+
+endpoints are selected.">
+
+
+
+
Skip to contents
@@ -19,24 +35,45 @@
+
+
@@ -56,7 +93,8 @@ teal Module: ANCOVA Summary
-
Usage
+
Usage
+
tm_t_ancova (
label ,
dataname ,
@@ -81,28 +119,35 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -110,110 +155,139 @@
Argumentsaval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-cov_var
+cov_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the covariates variables.
-include_interact
+include_interact
+
(logical
) whether an interaction term should be included in the model.
-interact_var
+interact_var
+
(character
) name of the variable that should have interactions
with arm. If the interaction is not needed, the default option is NULL
.
-interact_y
+interact_y
+
(character
) a selected item from the interact_var column which will be used
to select the specific ANCOVA
results when interact_var is discrete. If the interaction is not
needed, the default option is FALSE
.
-avisit
+avisit
+
(teal.transform::choices_selected()
) value of analysis
visit AVISIT
of interest.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Details
+
Details
+
When a single endpoint is selected, both unadjusted and adjusted comparison are provided. This modules
-expects that the analysis data has the following variables:
+
+
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -278,17 +352,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_binary_outcome.html b/main/reference/tm_t_binary_outcome.html
index 12e233381..3a222258d 100644
--- a/main/reference/tm_t_binary_outcome.html
+++ b/main/reference/tm_t_binary_outcome.html
@@ -1,7 +1,23 @@
-
-teal Module: Binary Outcome Table — tm_t_binary_outcome • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Binary Outcome Table — tm_t_binary_outcome • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -53,7 +90,8 @@ teal Module: Binary Outcome Table
-
Usage
+
Usage
+
tm_t_binary_outcome (
label ,
dataname ,
@@ -86,28 +124,35 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -115,27 +160,32 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-strata_var
+strata_var
+
(teal.transform::choices_selected()
) names of
the variables for stratified analysis.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-default_responses
+default_responses
+
(list
or character
) defines
the default codes for the response variable in the module per value of paramcd
.
A passed vector is transmitted for all paramcd
values. A passed list
must be named
@@ -144,12 +194,17 @@
Argumentsrsp_table
+rsp_table
+
(logical
) whether the initial set-up of the module should match RSPT01
. Defaults to FALSE
.
-control
-(named list
) named list containing 3 named lists as follows:
+
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
+
+
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_coxreg.html b/main/reference/tm_t_coxreg.html
index 15f79b023..8f166fd16 100644
--- a/main/reference/tm_t_coxreg.html
+++ b/main/reference/tm_t_coxreg.html
@@ -1,11 +1,27 @@
-
-teal Module: Cox Regression Model — tm_t_coxreg • teal.modules.clinical
+
+
+
+
+
+teal Module: Cox Regression Model — tm_t_coxreg • teal.modules.clinical
+
+
+
+
+
+
+
+and COXT02 here.">
+
+
+
+
Skip to contents
@@ -21,24 +37,45 @@
+
+
@@ -59,7 +96,8 @@ teal Module: Cox Regression Model
-
Usage
+
Usage
+
tm_t_coxreg (
label ,
dataname ,
@@ -86,28 +124,35 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -115,115 +160,145 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-cov_var
+cov_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the covariates variables.
-strata_var
+strata_var
+
(teal.transform::choices_selected()
) names of
the variables for stratified analysis.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-cnsr_var
+cnsr_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the censoring variable.
-multivariate
+multivariate
+
(logical
) if FALSE
, the univariable approach is used instead of the
multi-variable model.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Details
+
Details
+
The Cox Proportional Hazards (PH) model is the most commonly used method to
estimate the magnitude of the effect in survival analysis. It assumes proportional
hazards: the ratio of the hazards between groups (e.g., two arms) is constant over time.
This ratio is referred to as the "hazard ratio" (HR) and is one of the most
commonly reported metrics to describe the effect size in survival analysis.
-
This modules expects that the analysis data has the following variables:
AVAL
: time to event
+This modules expects that the analysis data has the following variables:
+
+AVAL
: time to event
CNSR
: 1 if record in AVAL
is censored, 0 otherwise
PARAMCD
: variable used to filter for endpoint (e.g. OS). After
filtering for PARAMCD
one observation per patient is expected
- The arm variables and stratification/covariate variables are taken from the ADSL
data.
+
+
The arm variables and stratification/covariate variables are taken from the ADSL
data.
+
+
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
@@ -234,10 +309,12 @@ Examples in Shinylive
-
+
+
-
Examples
+
Examples
+
## First example
## =============
## The example below is based on the usual approach involving creation of
@@ -366,17 +443,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_events.html b/main/reference/tm_t_events.html
index 313465990..876f0c7ff 100644
--- a/main/reference/tm_t_events.html
+++ b/main/reference/tm_t_events.html
@@ -1,5 +1,21 @@
-
-teal Module: Events by Term — tm_t_events • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Events by Term — tm_t_events • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Events by Term
-
Usage
+
Usage
+
tm_t_events (
label ,
dataname ,
@@ -77,22 +115,28 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable(s) in the results table.
@@ -100,125 +144,154 @@
Argumentshlt
+hlt
+
(teal.transform::choices_selected()
) name of the variable
with high level term for events.
-llt
+llt
+
(teal.transform::choices_selected()
) name of the variable
with low level term for events.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-event_type
+event_type
+
(character
) type of event that is summarized (e.g. adverse event, treatment). Default
is "event"
.
-sort_criteria
+sort_criteria
+
(character
) how to sort the final table. Default option freq_desc
sorts
on column sort_freq_col
by decreasing number of patients with event. Alternative option alpha
sorts events
alphabetically.
-sort_freq_col
+sort_freq_col
+
(character
) column to sort by frequency on if sort_criteria
is set to freq_desc
.
-prune_freq
+prune_freq
+
(number
) threshold to use for trimming table using event incidence rate in any column.
-prune_diff
+prune_diff
+
(number
) threshold to use for trimming table using as criteria difference in
rates between any two columns.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-incl_overall_sum
+incl_overall_sum
+
(flag
) whether two rows which summarize the overall number of adverse events
should be included at the top of the table.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -258,17 +331,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_events_by_grade.html b/main/reference/tm_t_events_by_grade.html
index 4c44223a1..2c51d62a1 100644
--- a/main/reference/tm_t_events_by_grade.html
+++ b/main/reference/tm_t_events_by_grade.html
@@ -1,5 +1,21 @@
-
-teal Module: Events by Grade — tm_t_events_by_grade • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Events by Grade — tm_t_events_by_grade • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Events by Grade
-
Usage
+
Usage
+
tm_t_events_by_grade (
label ,
dataname ,
@@ -77,138 +115,172 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-hlt
+hlt
+
(teal.transform::choices_selected()
) name of the variable
with high level term for events.
-llt
+llt
+
(teal.transform::choices_selected()
) name of the variable
with low level term for events.
-grade
+grade
+
(character
) name of the severity level variable.
-grading_groups
+grading_groups
+
(list
) named list of grading groups used when col_by_grade = TRUE
.
-col_by_grade
+col_by_grade
+
(logical
) whether to display the grading groups in nested columns.
-prune_freq
+prune_freq
+
(number
) threshold to use for trimming table using event incidence rate in any column.
-prune_diff
+prune_diff
+
(number
) threshold to use for trimming table using as criteria difference in
rates between any two columns.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_events_patyear.html b/main/reference/tm_t_events_patyear.html
index bef107883..6374ce136 100644
--- a/main/reference/tm_t_events_patyear.html
+++ b/main/reference/tm_t_events_patyear.html
@@ -1,5 +1,21 @@
-
-teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Event Rates Adjusted for Patient-Years
-
Usage
+
Usage
+
tm_t_events_patyear (
label ,
dataname ,
@@ -77,22 +115,28 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable(s) in the results table.
@@ -100,102 +144,126 @@
Argumentsevents_var
+events_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for the variable with all event counts.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-avalu_var
+avalu_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for the analysis unit variable.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
@@ -206,10 +274,12 @@ Examples in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_events_summary.html b/main/reference/tm_t_events_summary.html
index 504d8023e..a265ae3fc 100644
--- a/main/reference/tm_t_events_summary.html
+++ b/main/reference/tm_t_events_summary.html
@@ -1,5 +1,21 @@
-
-teal Module: Adverse Events Summary — tm_t_events_summary • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Adverse Events Summary — tm_t_events_summary • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Adverse Events Summary
-
Usage
+
Usage
+
tm_t_events_summary (
label ,
dataname ,
@@ -85,22 +123,28 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable(s) in the results table.
@@ -108,138 +152,169 @@
Argumentsflag_var_anl
+flag_var_anl
+
(teal.transform::choices_selected()
or NULL
)
vector with names of flag variables from dataset
used to count adverse event sub-groups (e.g. Serious events,
Related events, etc.). Variable labels are used as table row names if they exist.
-flag_var_aesi
+flag_var_aesi
+
(teal.transform::choices_selected()
or NULL
)
vector with names of flag variables from dataset
used to count adverse event special interest groups. All flag
variables must be of type logical
. Variable labels are used as table row names if they exist.
-dthfl_var
+dthfl_var
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for variable names that can be used as death flag variable.
Records with `"Y"“ are summarized in the table row for "Total number of deaths".
-dcsreas_var
+dcsreas_var
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for variable names that can be used as study discontinuation
reason variable. Records with "ADVERSE EVENTS"
are summarized in the table row for
"Total number of patients withdrawn from study due to an AE".
-llt
+llt
+
(teal.transform::choices_selected()
) name of the variable
with low level term for events.
-aeseq_var
+aeseq_var
+
(teal.transform::choices_selected()
) variable for
adverse events sequence number from dataset
. Used for counting total number of events.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-count_dth
+count_dth
+
(logical
) whether to show count of total deaths (based on dthfl_var
). Defaults to TRUE
.
-count_wd
+count_wd
+
(logical
) whether to show count of patients withdrawn from study due to an adverse event
(based on dcsreas_var
). Defaults to TRUE
.
-count_subj
+count_subj
+
(logical
) whether to show count of unique subjects (based on USUBJID
). Only applies if
event flag variables are provided.
-count_pt
+count_pt
+
(logical
) whether to show count of unique preferred terms (based on llt
). Only applies if
event flag variables are provided.
-count_events
+count_events
+
(logical
) whether to show count of events (based on aeseq_var
). Only applies if event
flag variables are provided.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_exposure.html b/main/reference/tm_t_exposure.html
index f7fed5f37..fbf598a20 100644
--- a/main/reference/tm_t_exposure.html
+++ b/main/reference/tm_t_exposure.html
@@ -1,5 +1,21 @@
-
-teal Module: Exposure Table for Risk management plan — tm_t_exposure • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Exposure Table for Risk management plan — tm_t_exposure • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Exposure Table for Risk management plan
-
Usage
+
Usage
+
tm_t_exposure (
label ,
dataname ,
@@ -81,147 +119,182 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-row_by_var
+row_by_var
+
(teal.transform::choices_selected()
)
object with all available choices and preselected option for
variable names that can be used to split rows.
-col_by_var
+col_by_var
+
(teal.transform::choices_selected()
)
object with all available choices and preselected option for
variable names that can be used to split columns.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-paramcd_label
+paramcd_label
+
(character
) the column from the dataset where the value will be used to
label the argument paramcd
.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-parcat
+parcat
+
(teal.transform::choices_selected()
)
object with all available choices and preselected option for
parameter category values.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-avalu_var
+avalu_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for the analysis unit variable.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-add_total_row
+add_total_row
+
(flag
) whether a "total" level should be added after the others which includes all the
levels that constitute the split. A custom label can be set for this level via the total_row_label
argument.
-total_row_label
+total_row_label
+
(character
) string to display as total row label if row is
enabled (see add_total_row
).
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Modules
+
Decorating Modules
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_logistic.html b/main/reference/tm_t_logistic.html
index fc39ce5a7..c3af3bf27 100644
--- a/main/reference/tm_t_logistic.html
+++ b/main/reference/tm_t_logistic.html
@@ -1,7 +1,23 @@
-
-teal Module: Logistic Regression — tm_t_logistic • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Logistic Regression — tm_t_logistic • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -53,7 +90,8 @@ teal Module: Logistic Regression
-
Usage
+
Usage
+
tm_t_logistic (
label ,
dataname ,
@@ -75,22 +113,28 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
or NULL
) object
with all available choices and preselected option for variable names that can be used as arm_var
. This defines
the grouping variable(s) in the results table. If there are two elements selected for arm_var
, the second
@@ -98,7 +142,8 @@
Argumentsarm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -106,83 +151,104 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-cov_var
+cov_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the covariates variables.
-avalc_var
+avalc_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the analysis variable (categorical).
-conf_level
+conf_level
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the confidence level, each within range of (0, 1).
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_mult_events.html b/main/reference/tm_t_mult_events.html
index 0e3e8f52d..3982bd5ce 100644
--- a/main/reference/tm_t_mult_events.html
+++ b/main/reference/tm_t_mult_events.html
@@ -1,5 +1,21 @@
-
-teal Module: Multiple Events by Term — tm_t_mult_events • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Multiple Events by Term — tm_t_mult_events • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Multiple Events by Term
-
Usage
+
Usage
+
tm_t_mult_events (
label ,
dataname ,
@@ -73,128 +111,159 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-seq_var
+seq_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as analysis sequence number
variable. Used for counting the unique number of events.
-hlt
+hlt
+
(teal.transform::choices_selected()
) name of the variable
with high level term for events.
-llt
+llt
+
(teal.transform::choices_selected()
) name of the variable
with low level term for events.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-event_type
+event_type
+
(character
) type of event that is summarized (e.g. adverse event, treatment). Default
is "event"
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -237,17 +306,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_pp_basic_info.html b/main/reference/tm_t_pp_basic_info.html
index 6c94c006a..5b930c90b 100644
--- a/main/reference/tm_t_pp_basic_info.html
+++ b/main/reference/tm_t_pp_basic_info.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Basic Info — tm_t_pp_basic_info • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Basic Info — tm_t_pp_basic_info • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Basic Info
-
Usage
+
Usage
+
tm_t_pp_basic_info (
label ,
dataname = "ADSL" ,
@@ -63,71 +101,92 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-vars
+vars
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variables from dataname
to show in the table.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -159,17 +218,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_pp_laboratory.html b/main/reference/tm_t_pp_laboratory.html
index 2845df62b..a92b9e8d9 100644
--- a/main/reference/tm_t_pp_laboratory.html
+++ b/main/reference/tm_t_pp_laboratory.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Laboratory Table
-
Usage
+
Usage
+
tm_t_pp_laboratory (
label ,
dataname = "ADLB" ,
@@ -71,109 +109,138 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-timepoints
+timepoints
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the time variable from dataname
.
-aval
+aval
+
Please use the aval_var
argument instead.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-avalu
+avalu
+
Please use the avalu_var
argument instead.
-avalu_var
+avalu_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for the analysis unit variable.
-param
+param
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the PARAM
variable from dataname
.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-anrind
+anrind
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the ANRIND
variable from dataname
. Variable should have the
following 3 levels: "HIGH"
, "LOW"
, and "NORMAL"
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -227,17 +294,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_pp_medical_history.html b/main/reference/tm_t_pp_medical_history.html
index d55391949..7bc83690c 100644
--- a/main/reference/tm_t_pp_medical_history.html
+++ b/main/reference/tm_t_pp_medical_history.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Medical History — tm_t_pp_medical_history • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Medical History — tm_t_pp_medical_history • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Medical History
-
Usage
+
Usage
+
tm_t_pp_medical_history (
label ,
dataname = "ADMH" ,
@@ -66,85 +104,109 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-mhterm
+mhterm
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the MHTERM
variable from dataname
.
-mhbodsys
+mhbodsys
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the MHBODSYS
variable from dataname
.
-mhdistat
+mhdistat
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the MHDISTAT
variable from dataname
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -187,17 +249,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_pp_prior_medication.html b/main/reference/tm_t_pp_prior_medication.html
index 4db3305cc..ae2e1e00c 100644
--- a/main/reference/tm_t_pp_prior_medication.html
+++ b/main/reference/tm_t_pp_prior_medication.html
@@ -1,5 +1,21 @@
-
-teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Patient Profile Prior Medication
-
Usage
+
Usage
+
tm_t_pp_prior_medication (
label ,
dataname = "ADCM" ,
@@ -67,90 +105,115 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-patient_col
+patient_col
+
(character
) name of patient ID variable.
-atirel
+atirel
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the ATIREL
variable from dataname
.
-cmdecod
+cmdecod
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMDECOD
variable from dataname
.
-cmindc
+cmindc
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMINDC
variable from dataname
.
-cmstdy
+cmstdy
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the CMSTDY
variable from dataname
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_shift_by_arm.html b/main/reference/tm_t_shift_by_arm.html
index 3e4eef5a9..207fdd409 100644
--- a/main/reference/tm_t_shift_by_arm.html
+++ b/main/reference/tm_t_shift_by_arm.html
@@ -1,5 +1,21 @@
-
-teal Module: Shift by Arm — tm_t_shift_by_arm • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Shift by Arm — tm_t_shift_by_arm • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Shift by Arm
-
Usage
+
Usage
+
tm_t_shift_by_arm (
label ,
dataname ,
@@ -78,139 +116,173 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-visit_var
+visit_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as visit
variable.
Must be a factor in dataname
.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-base_var
+base_var
+
Please use the baseline_var
argument instead.
-baseline_var
+baseline_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable values that can be used as baseline_var
.
-treatment_flag_var
+treatment_flag_var
+
(teal.transform::choices_selected()
) on
treatment flag variable.
-treatment_flag
+treatment_flag
+
(teal.transform::choices_selected()
) value
indicating on treatment records in treatment_flag_var
.
-useNA
+useNA
+
(character
) whether missing data (NA
) should be displayed as a level.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-add_total
+add_total
+
(logical
) whether to include row with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -262,17 +334,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_shift_by_arm_by_worst.html b/main/reference/tm_t_shift_by_arm_by_worst.html
index 27da9d354..2912bf346 100644
--- a/main/reference/tm_t_shift_by_arm_by_worst.html
+++ b/main/reference/tm_t_shift_by_arm_by_worst.html
@@ -1,5 +1,21 @@
-
-teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Shift by Arm by Worst Analysis Indicator Level
-
Usage
+
Usage
+
tm_t_shift_by_arm_by_worst (
label ,
dataname ,
@@ -78,137 +116,171 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-base_var
+base_var
+
Please use the baseline_var
argument instead.
-baseline_var
+baseline_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable values that can be used as baseline_var
.
-worst_flag_var
+worst_flag_var
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for variable names that can be used as worst flag variable.
-worst_flag
+worst_flag
+
(character
) value indicating worst analysis indicator level.
-treatment_flag_var
+treatment_flag_var
+
(teal.transform::choices_selected()
) on
treatment flag variable.
-treatment_flag
+treatment_flag
+
(teal.transform::choices_selected()
) value
indicating on treatment records in treatment_flag_var
.
-useNA
+useNA
+
(character
) whether missing data (NA
) should be displayed as a level.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-add_total
+add_total
+
(logical
) whether to include row with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -263,17 +335,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_shift_by_grade.html b/main/reference/tm_t_shift_by_grade.html
index 106652ea9..2ccb8c3ee 100644
--- a/main/reference/tm_t_shift_by_grade.html
+++ b/main/reference/tm_t_shift_by_grade.html
@@ -1,5 +1,21 @@
-
-teal Module: Grade Summary Table — tm_t_shift_by_grade • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Grade Summary Table — tm_t_shift_by_grade • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Grade Summary Table
-
Usage
+
Usage
+
tm_t_shift_by_grade (
label ,
dataname ,
@@ -87,147 +125,182 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-visit_var
+visit_var
+
(teal.transform::choices_selected()
) object with
all available choices and preselected option for variable names that can be used as visit
variable.
Must be a factor in dataname
.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-worst_flag_var
+worst_flag_var
+
(teal.transform::choices_selected()
) object
with all available choices and preselected option for variable names that can be used as worst flag variable.
-worst_flag_indicator
+worst_flag_indicator
+
(teal.transform::choices_selected()
)
value indicating worst grade.
-anl_toxgrade_var
+anl_toxgrade_var
+
(teal.transform::choices_selected()
)
variable for analysis toxicity grade.
-base_toxgrade_var
+base_toxgrade_var
+
(teal.transform::choices_selected()
)
variable for baseline toxicity grade.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-code_missing_baseline
+code_missing_baseline
+
(logical
) whether missing baseline grades should be counted as grade 0.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -284,17 +357,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_smq.html b/main/reference/tm_t_smq.html
index fe4d0464b..ab3a2f15d 100644
--- a/main/reference/tm_t_smq.html
+++ b/main/reference/tm_t_smq.html
@@ -1,5 +1,21 @@
-
-teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Adverse Events Table by Standardized MedDRA Query
-
Usage
+
Usage
+
tm_t_smq (
label ,
dataname ,
@@ -76,22 +114,28 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable(s) in the results table.
@@ -99,116 +143,143 @@
Argumentsid_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-llt
+llt
+
(teal.transform::choices_selected()
) name of the variable
with low level term for events.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-sort_criteria
+sort_criteria
+
(character
) how to sort the final table. Default option freq_desc
sorts
on column sort_freq_col
by decreasing number of patients with event. Alternative option alpha
sorts events
alphabetically.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-smq_varlabel
+smq_varlabel
+
(character
) label to use for new column SMQ
created by tern::h_stack_by_baskets()
.
-baskets
+baskets
+
(teal.transform::choices_selected()
) object with all
available choices and preselected options for standardized/customized queries.
-scopes
+scopes
+
(teal.transform::choices_selected()
) object with all
available choices for the scopes of standardized queries.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -259,17 +330,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_summary.html b/main/reference/tm_t_summary.html
index 605af2bf5..accdd4a48 100644
--- a/main/reference/tm_t_summary.html
+++ b/main/reference/tm_t_summary.html
@@ -1,5 +1,21 @@
-
-teal Module: Summary of Variables — tm_t_summary • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Summary of Variables — tm_t_summary • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Summary of Variables
-
Usage
+
Usage
+
tm_t_summary (
label ,
dataname ,
@@ -75,22 +113,28 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable(s) in the results table.
@@ -98,111 +142,137 @@
Argumentssummarize_vars
+summarize_vars
+
(teal.transform::choices_selected()
) names of
the variables that should be summarized.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-show_arm_var_labels
+show_arm_var_labels
+
(flag
) whether arm variable label(s) should be displayed. Defaults to TRUE
.
-useNA
+useNA
+
(character
) whether missing data (NA
) should be displayed as a level.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-numeric_stats
+numeric_stats
+
(character
) names of statistics to display for numeric summary variables. Available
statistics are n
, mean_sd
, mean_ci
, median
, median_ci
, quantiles
, range
, and geom_mean
.
-denominator
+denominator
+
(character
) chooses how percentages are calculated. With option N
, the reference
population from the column total is used as the denominator. With option n
, the number of non-missing
records in this row and column intersection is used as the denominator. If omit
is chosen, then the
percentage is omitted.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
# Preparation of the test case - use `EOSDY` and `DCSREAS` variables to demonstrate missing data.
data <- teal_data ( )
data <- within ( data , {
@@ -238,17 +308,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_summary_by.html b/main/reference/tm_t_summary_by.html
index d9f07c07a..5e828d121 100644
--- a/main/reference/tm_t_summary_by.html
+++ b/main/reference/tm_t_summary_by.html
@@ -1,5 +1,21 @@
-
-teal Module: Summarize Variables by Row Groups — tm_t_summary_by • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Summarize Variables by Row Groups — tm_t_summary_by • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ teal Module: Summarize Variables by Row Groups
-
Usage
+
Usage
+
tm_t_summary_by (
label ,
dataname ,
@@ -81,22 +119,28 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable(s) in the results table.
@@ -104,135 +148,166 @@
Argumentsby_vars
+by_vars
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names used to split the summary by rows.
-summarize_vars
+summarize_vars
+
(teal.transform::choices_selected()
) names of
the variables that should be summarized.
-id_var
+id_var
+
(teal.transform::choices_selected()
) object specifying
the variable name for subject id.
-paramcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-parallel_vars
+parallel_vars
+
(logical
) whether summarized variables should be arranged in columns. Can only be set to
TRUE
if all chosen analysis variables are numeric.
-row_groups
+row_groups
+
(logical
) whether summarized variables should be arranged in row groups.
-useNA
+useNA
+
(character
) whether missing data (NA
) should be displayed as a level.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-numeric_stats
+numeric_stats
+
(character
) names of statistics to display for numeric summary variables. Available
statistics are n
, mean_sd
, mean_ci
, median
, median_ci
, quantiles
, range
, and geom_mean
.
-denominator
+denominator
+
(character
) chooses how percentages are calculated. With option N
, the reference
population from the column total is used as the denominator. With option n
, the number of non-missing
records in this row and column intersection is used as the denominator. If omit
is chosen, then the
percentage is omitted.
-drop_arm_levels
+drop_arm_levels
+
(logical
) whether to drop unused levels of arm_var
. If TRUE
, arm_var
levels are
set to those used in the dataname
dataset. If FALSE
, arm_var
levels are set to those used in the
parentname
dataset. If dataname
and parentname
are the same, then drop_arm_levels
is set to TRUE
and
user input for this parameter is ignored.
-drop_zero_levels
+drop_zero_levels
+
(logical
) whether rows with zero counts in all columns should be removed from the table.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -279,17 +354,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/tm_t_tte.html b/main/reference/tm_t_tte.html
index a91b3267f..8acf4edd5 100644
--- a/main/reference/tm_t_tte.html
+++ b/main/reference/tm_t_tte.html
@@ -1,7 +1,23 @@
-
-teal Module: Time-To-Event Table — tm_t_tte • teal.modules.clinical
+
+
+
+
+
+
+teal Module: Time-To-Event Table — tm_t_tte • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -17,24 +33,45 @@
+
+
@@ -53,7 +90,8 @@ teal Module: Time-To-Event Table
-
Usage
+
Usage
+
tm_t_tte (
label ,
dataname ,
@@ -87,28 +125,35 @@ Usage
-
Arguments
+
Arguments
+
-
label
+
+label
+
(character
) menu item label of the module in the teal app.
-dataname
+dataname
+
(character
) analysis data used in teal module.
-parentname
+parentname
+
(character
) parent analysis data used in teal module, usually this refers to ADSL
.
-arm_var
+arm_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for variable names that can be used as arm_var
.
It defines the grouping variable in the results table.
-arm_ref_comp
+arm_ref_comp
+
(list
) optional, if specified it must be a named list with each element corresponding to
an arm variable in ADSL
and the element must be another list (possibly
with delayed teal.transform::variable_choices()
or delayed teal.transform::value_choices()
@@ -116,136 +161,172 @@
Argumentsparamcd
+paramcd
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the parameter code variable from dataname
.
-strata_var
+strata_var
+
(teal.transform::choices_selected()
) names of
the variables for stratified analysis.
-aval_var
+aval_var
+
(teal.transform::choices_selected()
) object with
all available choices and pre-selected option for the analysis variable.
-cnsr_var
+cnsr_var
+
(teal.transform::choices_selected()
) object with all
available choices and preselected option for the censoring variable.
-conf_level_coxph
+conf_level_coxph
+
(teal.transform::choices_selected()
) object with all available choices and
pre-selected option for confidence level, each within range of (0, 1).
-conf_level_survfit
+conf_level_survfit
+
(teal.transform::choices_selected()
) object with all available choices and
pre-selected option for confidence level, each within range of (0, 1).
-time_points
+time_points
+
(teal.transform::choices_selected()
) object with all available choices and preselected option
for time points that can be used in tern::surv_timepoint()
.
-time_unit_var
+time_unit_var
+
(teal.transform::choices_selected()
) object
with all available choices and pre-selected option for the time unit variable.
-event_desc_var
+event_desc_var
+
(character
or teal.transform::data_extract_spec()
) variable name with the
event description information, optional.
-add_total
+add_total
+
(logical
) whether to include column with total number of patients.
-total_label
+total_label
+
(string
) string to display as total column/row label if column/row is
enabled (see add_total
). Defaults to "All Patients"
. To set a new default total_label
to
apply in all modules, run set_default_total_label("new_default")
.
-na_level
+na_level
+
(string
) used to replace all NA
or empty values
in character or factor variables in the data. Defaults to "<Missing>"
. To set a
default na_level
to apply in all modules, run set_default_na_str("new_default")
.
-pre_output
+pre_output
+
(shiny.tag
) optional, with text placed before the output to put the output into context.
For example a title.
-post_output
+post_output
+
(shiny.tag
) optional, with text placed after the output to put the output into context.
For example the shiny::helpText()
elements are useful.
-basic_table_args
+basic_table_args
+
(basic_table_args
) optional object created by teal.widgets::basic_table_args()
with settings for the module table. The argument is merged with option teal.basic_table_args
and with default
module arguments (hard coded in the module body).
For more details, see the vignette: vignette("custom-basic-table-arguments", package = "teal.widgets")
.
-decorators
-
+
decorators
+
+
+
" (list
of teal_transform_module
, named list
of teal_transform_module
or" NULL
) optional,
if not NULL
, decorator for tables or plots included in the module.
When a named list of teal_transform_module
, the decorators are applied to the respective output objects.
Otherwise, the decorators are applied to all objects, which is equivalent as using the name default
.
-See section "Decorating Module" below for more details.
+ See section "Decorating Module" below for more details.
+
-
+
+
-
Value
+
Value
+
a teal_module
object.
+
+
+
+
-
Decorating Module
+
Decorating Module
+
-
This module generates the following objects, which can be modified in place using decorators:
For additional details and examples of decorators, refer to the vignette
+
This module generates the following objects, which can be modified in place using decorators:
+
+
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
-
See also
+
See also
+
The TLG Catalog where additional example
apps implementing this module can be found.
-
Examples in Shinylive
+
Examples in Shinylive
+
-
example-1
+
+example-1
Open in Shinylive
-
+
+
-
Examples
+
Examples
+
data <- teal_data ( )
data <- within ( data , {
ADSL <- tmc_ex_adsl
@@ -304,17 +385,19 @@ ExamplesOn this page
-
+
+
-
+
+
-
+
+
diff --git a/main/reference/validate_arm.html b/main/reference/validate_arm.html
index e0e50c976..898e34f59 100644
--- a/main/reference/validate_arm.html
+++ b/main/reference/validate_arm.html
@@ -1,5 +1,21 @@
-
-Check if vector is valid as to be used as a treatment arm variable — validate_arm • teal.modules.clinical
+
+
+
+
+
+
+Check if vector is valid as to be used as a treatment arm variable — validate_arm • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,36 +87,44 @@ Check if vector is valid as to be used as a treatment arm variable
-
Arguments
+
Arguments
+
-
arm_vec
+
+arm_vec
+
vector to be validated
-
+
+
-
Details
+
Details
+
A validate error is returned if the vector is not a factor with a more detailed
error message if any of the entries are empty strings
+
+
-
+
+
-
+
+
diff --git a/main/reference/validate_standard_inputs.html b/main/reference/validate_standard_inputs.html
index 88fbcfba4..66b2e9204 100644
--- a/main/reference/validate_standard_inputs.html
+++ b/main/reference/validate_standard_inputs.html
@@ -1,5 +1,21 @@
-
-Validate standard input values for a teal module — validate_standard_inputs • teal.modules.clinical
+
+
+
+
+
+
+Validate standard input values for a teal module — validate_standard_inputs • teal.modules.clinical
+
+
+
+
+
+
+
+
+
+
+
Skip to contents
@@ -15,24 +31,45 @@
+
+
@@ -50,7 +87,8 @@ Validate standard input values for a teal module
-
Usage
+
Usage
+
validate_standard_inputs (
adsl ,
adslvars = character ( 0 ) ,
@@ -67,69 +105,85 @@ Usage
-
Arguments
+
Arguments
+
-
adsl
+
+adsl
+
data.frame with subject-level data
-adslvars
+adslvars
+
required variables from ADSL
-anl
+anl
+
data.frame with analysis data
-anlvars
+anlvars
+
required variables from ANL
-need_arm
+need_arm
+
flag indicating whether grouping variable arm_var
is required or can be optionally NULL
.
-arm_var
+arm_var
+
character with name of grouping variable, typically arm
-ref_arm
+ref_arm
+
character with name of reference level in arm_var
-comp_arm
+comp_arm
+
character with name for comparison level in arm_var
-min_n_levels_armvar
+min_n_levels_armvar
+
minimum number of levels in grouping variable arm_var
.
Defaults to 1, NULL
for no minimum.
-max_n_levels_armvar
+max_n_levels_armvar
+
maximum number of levels in grouping variable arm_var
.
Use NULL
for no maximum.
-min_nrow
+min_nrow
+
minimum number of observations in ADSL
and ANL
-
+
+
+
+
-
+
+
-
+
+
diff --git a/main/search.json b/main/search.json
index 6db6a4cdf..44ec57142 100644
--- a/main/search.json
+++ b/main/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"generating-minimal-data-to-test-teal-modules-clinical","dir":"Articles","previous_headings":"","what":"Generating minimal data to test teal.modules.clinical","title":"Example Data Generation","text":"following script used create save cached synthetic CDISC data data/ directory use examples tests teal.modules.clinical package. script/vignette initialized Emily de la Rua tern. Disclaimer: vignette concerns mainly development minimal stable test data kept internal feature tracking.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"setup-helper-functions","dir":"Articles","previous_headings":"","what":"Setup & Helper Functions","title":"Example Data Generation","text":"","code":"library(dplyr) library(teal.data) study_duration_secs <- lubridate::seconds(lubridate::years(2)) sample_fct <- function(x, N, ...) { checkmate::assert_number(N) factor(sample(x, N, replace = TRUE, ...), levels = if (is.factor(x)) levels(x) else x) } retain <- function(df, value_var, event, outside = NA) { indices <- c(1, which(event == TRUE), nrow(df) + 1) values <- c(outside, value_var[event == TRUE]) rep(values, diff(indices)) } relvar_init <- function(relvar1, relvar2) { if (length(relvar1) != length(relvar2)) { message(simpleError( \"The argument value length of relvar1 and relvar2 differ. They must contain the same number of elements.\" )) return(NA) } return(list(\"relvar1\" = relvar1, \"relvar2\" = relvar2)) } rel_var <- function(df = NULL, var_name = NULL, var_values = NULL, related_var = NULL) { if (is.null(df)) { message(\"Missing data frame argument value.\") return(NA) } else { n_relvar1 <- length(unique(df[, related_var, drop = TRUE])) n_relvar2 <- length(var_values) if (n_relvar1 != n_relvar2) { message(paste(\"Unequal vector lengths for\", related_var, \"and\", var_name)) return(NA) } else { relvar1 <- unique(df[, related_var, drop = TRUE]) relvar2_values <- rep(NA, nrow(df)) for (r in seq_len(length(relvar1))) { matched <- which(df[, related_var, drop = TRUE] == relvar1[r]) relvar2_values[matched] <- var_values[r] } return(relvar2_values) } } } visit_schedule <- function(visit_format = \"WEEK\", n_assessments = 10L, n_days = 5L) { if (!(toupper(visit_format) %in% c(\"WEEK\", \"CYCLE\"))) { message(\"Visit format value must either be: WEEK or CYCLE\") return(NA) } if (toupper(visit_format) == \"WEEK\") { assessments <- 1:n_assessments assessments_ord <- -1:n_assessments visit_values <- c(\"SCREENING\", \"BASELINE\", paste(toupper(visit_format), assessments, \"DAY\", (assessments * 7) + 1)) } else if (toupper(visit_format) == \"CYCLE\") { cycles <- sort(rep(1:n_assessments, times = 1, each = n_days)) days <- rep(seq(1:n_days), times = n_assessments, each = 1) assessments_ord <- 0:(n_assessments * n_days) visit_values <- c(\"SCREENING\", paste(toupper(visit_format), cycles, \"DAY\", days)) } visit_values <- stats::reorder(factor(visit_values), assessments_ord) } rtpois <- function(n, lambda) stats::qpois(stats::runif(n, stats::dpois(0, lambda), 1), lambda) rtexp <- function(n, rate, l = NULL, r = NULL) { if (!is.null(l)) { l - log(1 - stats::runif(n)) / rate } else if (!is.null(r)) { -log(1 - stats::runif(n) * (1 - exp(-r * rate))) / rate } else { stats::rexp(n, rate) } } str_extract <- function(string, pattern) regmatches(string, gregexpr(pattern, string)) with_label <- function(x, label) { attr(x, \"label\") <- as.vector(label) x } common_var_labels <- c( USUBJID = \"Unique Subject Identifier\", STUDYID = \"Study Identifier\", PARAM = \"Parameter\", PARAMCD = \"Parameter Code\", AVISIT = \"Analysis Visit\", AVISITN = \"Analysis Visit (N)\", AVAL = \"Analysis Value\", AVALU = \"Analysis Value Unit\", AVALC = \"Character Result/Finding\", BASE = \"Baseline Value\", BASE2 = \"Screening Value\", ABLFL = \"Baseline Record Flag\", ABLFL2 = \"Screening Record Flag\", CHG = \"Absolute Change from Baseline\", PCHG = \"Percentage Change from Baseline\", ANRIND = \"Analysis Reference Range Indicator\", BNRIND = \"Baseline Reference Range Indicator\", ANRLO = \"Analysis Normal Range Lower Limit\", ANRHI = \"Analysis Normal Range Upper Limit\", CNSR = \"Censor\", ADTM = \"Analysis Datetime\", ADY = \"Analysis Relative Day\", ASTDY = \"Analysis Start Relative Day\", AENDY = \"Analysis End Relative Day\", ASTDTM = \"Analysis Start Datetime\", AENDTM = \"Analysis End Datetime\", VISITDY = \"Planned Study Day of Visit\", EVNTDESC = \"Event or Censoring Description\", CNSDTDSC = \"Censor Date Description\", BASETYPE = \"Baseline Type\", DTYPE = \"Derivation Type\", ONTRTFL = \"On Treatment Record Flag\", WORS01FL = \"Worst Observation in Window Flag 01\", WORS02FL = \"Worst Post-Baseline Observation\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adsl","dir":"Articles","previous_headings":"","what":"ADSL","title":"Example Data Generation","text":"","code":"generate_adsl <- function(N = 200) { set.seed(1) sys_dtm <- lubridate::fast_strptime(\"20/2/2019 11:16:16.683\", \"%d/%m/%Y %H:%M:%OS\", tz = \"UTC\") country_site_prob <- c(.5, .121, .077, .077, .075, .052, .046, .025, .014, .003) adsl <- tibble::tibble( STUDYID = rep(\"AB12345\", N) %>% with_label(\"Study Identifier\"), COUNTRY = sample_fct( c(\"CHN\", \"USA\", \"BRA\", \"PAK\", \"NGA\", \"RUS\", \"JPN\", \"GBR\", \"CAN\", \"CHE\"), N, prob = country_site_prob ) %>% with_label(\"Country\"), SITEID = sample_fct(1:20, N, prob = rep(country_site_prob, times = 2)), SUBJID = paste(\"id\", seq_len(N), sep = \"-\") %>% with_label(\"Subject Identifier for the Study\"), AGE = (sapply(stats::rchisq(N, df = 5, ncp = 10), max, 0) + 20) %>% with_label(\"Age\"), SEX = c(\"F\", \"M\") %>% sample_fct(N, prob = c(.52, .48)) %>% with_label(\"Sex\"), ARMCD = c(\"ARM A\", \"ARM B\", \"ARM C\") %>% sample_fct(N) %>% with_label(\"Planned Arm Code\"), ARM = dplyr::recode( .data$ARMCD, \"ARM A\" = \"A: Drug X\", \"ARM B\" = \"B: Placebo\", \"ARM C\" = \"C: Combination\" ) %>% with_label(\"Description of Planned Arm\"), ACTARMCD = .data$ARMCD %>% with_label(\"Actual Arm Code\"), ACTARM = .data$ARM %>% with_label(\"Description of Actual Arm\"), RACE = c( \"ASIAN\", \"BLACK OR AFRICAN AMERICAN\", \"WHITE\", \"AMERICAN INDIAN OR ALASKA NATIVE\", \"MULTIPLE\", \"NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER\", \"OTHER\", \"UNKNOWN\" ) %>% sample_fct(N, prob = c(.55, .23, .16, .05, .004, .003, .002, .002)) %>% with_label(\"Race\"), TRTSDTM = sys_dtm + sample(seq(0, study_duration_secs), size = N, replace = TRUE) %>% with_label(\"Datetime of First Exposure to Treatment\"), TRTEDTM = c(TRTSDTM + study_duration_secs) %>% with_label(\"Datetime of Last Exposure to Treatment\"), EOSDY = ceiling(as.numeric(difftime(TRTEDTM, TRTSDTM, units = \"days\"))) %>% with_label(\"End of Study Relative Day\"), EOSDT = lubridate::date(TRTEDTM) %>% with_label(\"End of Study Date\"), STRATA1 = c(\"A\", \"B\", \"C\") %>% sample_fct(N) %>% with_label(\"Stratification Factor 1\"), STRATA2 = c(\"S1\", \"S2\") %>% sample_fct(N) %>% with_label(\"Stratification Factor 2\"), BMRKR1 = stats::rchisq(N, 6) %>% with_label(\"Continuous Level Biomarker 1\"), BMRKR2 = sample_fct(c(\"LOW\", \"MEDIUM\", \"HIGH\"), N) %>% with_label(\"Continuous Level Biomarker 2\") ) # associate sites with countries and regions adsl <- adsl %>% dplyr::mutate( SITEID = paste0(.data$COUNTRY, \"-\", .data$SITEID) %>% with_label(\"Study Site Identifier\"), REGION1 = factor(dplyr::case_when( COUNTRY %in% c(\"NGA\") ~ \"Africa\", COUNTRY %in% c(\"CHN\", \"JPN\", \"PAK\") ~ \"Asia\", COUNTRY %in% c(\"RUS\") ~ \"Eurasia\", COUNTRY %in% c(\"GBR\") ~ \"Europe\", COUNTRY %in% c(\"CAN\", \"USA\") ~ \"North America\", COUNTRY %in% c(\"BRA\") ~ \"South America\", TRUE ~ as.character(NA) )) %>% with_label(\"Geographic Region 1\"), SAFFL = factor(\"Y\") %>% with_label(\"Safety Population Flag\") ) %>% dplyr::mutate( USUBJID = paste(.data$STUDYID, .data$SITEID, .data$SUBJID, sep = \"-\") %>% with_label(\"Unique Subject Identifier\") ) # disposition related variables # using probability of 1 for the \"DEATH\" level to ensure at least one death record exists l_dcsreas <- list( choices = c( \"ADVERSE EVENT\", \"DEATH\", \"LACK OF EFFICACY\", \"PHYSICIAN DECISION\", \"PROTOCOL VIOLATION\", \"WITHDRAWAL BY PARENT/GUARDIAN\", \"WITHDRAWAL BY SUBJECT\" ), prob = c(.2, 1, .1, .1, .2, .1, .1) ) l_dthcat_other <- list( choices = c( \"Post-study reporting of death\", \"LOST TO FOLLOW UP\", \"MISSING\", \"SUICIDE\", \"UNKNOWN\" ), prob = c(.1, .3, .3, .2, .1) ) adsl <- adsl %>% dplyr::mutate( EOSSTT = dplyr::case_when( EOSDY == max(EOSDY, na.rm = TRUE) ~ \"COMPLETED\", EOSDY < max(EOSDY, na.rm = TRUE) ~ \"DISCONTINUED\", is.na(TRTEDTM) ~ \"ONGOING\" ) %>% with_label(\"End of Study Status\") ) %>% dplyr::mutate( EOTSTT = .data$EOSSTT %>% with_label(\"End of Treatment Status\") ) %>% dplyr::mutate( DCSREAS = ifelse( .data$EOSSTT == \"DISCONTINUED\", sample(x = l_dcsreas$choices, size = N, replace = TRUE, prob = l_dcsreas$prob), as.character(NA) ) %>% with_label(\"Reason for Discontinuation from Study\") ) tmc_ex_adsl <- adsl %>% dplyr::mutate(DTHDT = dplyr::case_when( DCSREAS == \"DEATH\" ~ lubridate::date(TRTEDTM + lubridate::days(sample(0:50, size = N, replace = TRUE))) ) %>% with_label(\"Date of Death\")) save(tmc_ex_adsl, file = \"data/tmc_ex_adsl.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adae","dir":"Articles","previous_headings":"","what":"ADAE","title":"Example Data Generation","text":"","code":"generate_adae <- function(adsl = tmc_ex_adsl, max_n_aes = 5) { set.seed(1) lookup_ae <- tibble::tribble( ~AEBODSYS, ~AELLT, ~AEDECOD, ~AEHLT, ~AEHLGT, ~AETOXGR, ~AESOC, ~AESER, ~AEREL, \"cl A.1\", \"llt A.1.1.1.1\", \"dcd A.1.1.1.1\", \"hlt A.1.1.1\", \"hlgt A.1.1\", \"1\", \"cl A\", \"N\", \"N\", \"cl A.1\", \"llt A.1.1.1.2\", \"dcd A.1.1.1.2\", \"hlt A.1.1.1\", \"hlgt A.1.1\", \"2\", \"cl A\", \"Y\", \"N\", \"cl B.1\", \"llt B.1.1.1.1\", \"dcd B.1.1.1.1\", \"hlt B.1.1.1\", \"hlgt B.1.1\", \"5\", \"cl B\", \"Y\", \"Y\", \"cl B.2\", \"llt B.2.1.2.1\", \"dcd B.2.1.2.1\", \"hlt B.2.1.2\", \"hlgt B.2.1\", \"3\", \"cl B\", \"N\", \"N\", \"cl B.2\", \"llt B.2.2.3.1\", \"dcd B.2.2.3.1\", \"hlt B.2.2.3\", \"hlgt B.2.2\", \"1\", \"cl B\", \"Y\", \"N\", \"cl C.1\", \"llt C.1.1.1.3\", \"dcd C.1.1.1.3\", \"hlt C.1.1.1\", \"hlgt C.1.1\", \"4\", \"cl C\", \"N\", \"Y\", \"cl C.2\", \"llt C.2.1.2.1\", \"dcd C.2.1.2.1\", \"hlt C.2.1.2\", \"hlgt C.2.1\", \"2\", \"cl C\", \"N\", \"Y\", \"cl D.1\", \"llt D.1.1.1.1\", \"dcd D.1.1.1.1\", \"hlt D.1.1.1\", \"hlgt D.1.1\", \"5\", \"cl D\", \"Y\", \"Y\", \"cl D.1\", \"llt D.1.1.4.2\", \"dcd D.1.1.4.2\", \"hlt D.1.1.4\", \"hlgt D.1.1\", \"3\", \"cl D\", \"N\", \"N\", \"cl D.2\", \"llt D.2.1.5.3\", \"dcd D.2.1.5.3\", \"hlt D.2.1.5\", \"hlgt D.2.1\", \"1\", \"cl D\", \"N\", \"Y\" ) aag <- utils::read.table( sep = \",\", header = TRUE, text = paste( \"NAMVAR,SRCVAR,GRPTYPE,REFNAME,REFTERM,SCOPE\", \"CQ01NAM,AEDECOD,CUSTOM,D.2.1.5.3/A.1.1.1.1 aesi,dcd D.2.1.5.3,\", \"CQ01NAM,AEDECOD,CUSTOM,D.2.1.5.3/A.1.1.1.1 aesi,dcd A.1.1.1.1,\", \"SMQ01NAM,AEDECOD,SMQ,C.1.1.1.3/B.2.2.3.1 aesi,dcd C.1.1.1.3,BROAD\", \"SMQ01NAM,AEDECOD,SMQ,C.1.1.1.3/B.2.2.3.1 aesi,dcd B.2.2.3.1,BROAD\", \"SMQ02NAM,AEDECOD,SMQ,Y.9.9.9.9/Z.9.9.9.9 aesi,dcd Y.9.9.9.9,NARROW\", \"SMQ02NAM,AEDECOD,SMQ,Y.9.9.9.9/Z.9.9.9.9 aesi,dcd Z.9.9.9.9,NARROW\", sep = \"\\n\" ), stringsAsFactors = FALSE ) adae <- Map( function(id, sid) { n_aes <- sample(c(0, seq_len(max_n_aes)), 1) i <- sample(seq_len(nrow(lookup_ae)), n_aes, TRUE) dplyr::mutate( lookup_ae[i, ], USUBJID = id, STUDYID = sid ) }, adsl$USUBJID, adsl$STUDYID ) %>% Reduce(rbind, .) %>% `[`(c(10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9)) %>% dplyr::mutate( AETERM = gsub(\"dcd\", \"trm\", .data$AEDECOD) %>% with_label(\"Reported Term for the Adverse Event\"), AESEV = dplyr::case_when( AETOXGR == 1 ~ \"MILD\", AETOXGR %in% c(2, 3) ~ \"MODERATE\", AETOXGR %in% c(4, 5) ~ \"SEVERE\" ) %>% with_label(\"Severity/Intensity\") ) # merge adsl to be able to add AE date and study day variables adae <- dplyr::inner_join(adae, adsl, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\") %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::mutate(ASTDY = ceiling(difftime(ASTDTM, TRTSDTM, units = \"days\"))) %>% # add 1 to end of range incase both values passed to sample() are the same dplyr::mutate(AENDTM = sample( seq(lubridate::as_datetime(ASTDTM), lubridate::as_datetime(TRTENDT + 1), by = \"day\"), size = 1 )) %>% dplyr::mutate(AENDY = ceiling(difftime(AENDTM, TRTSDTM, units = \"days\"))) %>% dplyr::mutate(LDOSEDTM = dplyr::case_when( TRTSDTM < ASTDTM ~ lubridate::as_datetime(stats::runif(1, TRTSDTM, ASTDTM)), TRUE ~ ASTDTM )) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$AETERM) adae <- adae %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(AESEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$AETERM, .data$AESEQ ) outcomes <- c( \"UNKNOWN\", \"NOT RECOVERED/NOT RESOLVED\", \"RECOVERED/RESOLVED WITH SEQUELAE\", \"RECOVERING/RESOLVING\", \"RECOVERED/RESOLVED\" ) adae <- adae %>% dplyr::mutate( AEOUT = factor(ifelse( .data$AETOXGR == \"5\", \"FATAL\", as.character(sample_fct(outcomes, nrow(adae), prob = c(0.1, 0.2, 0.1, 0.3, 0.3))) )) %>% with_label(\"Outcome of Adverse Event\"), TRTEMFL = ifelse(.data$ASTDTM >= .data$TRTSDTM, \"Y\", \"\") %>% with_label(\"Treatment Emergent Analysis Flag\") ) l_aag <- split(aag, interaction(aag$NAMVAR, aag$SRCVAR, aag$GRPTYPE, drop = TRUE)) # Create aesi flags l_aesi <- lapply(l_aag, function(d_adag, d_adae) { names(d_adag)[names(d_adag) == \"REFTERM\"] <- d_adag$SRCVAR[1] names(d_adag)[names(d_adag) == \"REFNAME\"] <- d_adag$NAMVAR[1] if (d_adag$GRPTYPE[1] == \"CUSTOM\") { d_adag <- d_adag[-which(names(d_adag) == \"SCOPE\")] } else if (d_adag$GRPTYPE[1] == \"SMQ\") { names(d_adag)[names(d_adag) == \"SCOPE\"] <- paste0(substr(d_adag$NAMVAR[1], 1, 5), \"SC\") } d_adag <- d_adag[-which(names(d_adag) %in% c(\"NAMVAR\", \"SRCVAR\", \"GRPTYPE\"))] d_new <- dplyr::left_join(x = d_adae, y = d_adag, by = intersect(names(d_adae), names(d_adag))) d_new[, dplyr::setdiff(names(d_new), names(d_adae)), drop = FALSE] }, adae) adae <- dplyr::bind_cols(adae, l_aesi) actions <- c( \"DOSE RATE REDUCED\", \"UNKNOWN\", \"NOT APPLICABLE\", \"DRUG INTERRUPTED\", \"DRUG WITHDRAWN\", \"DOSE INCREASED\", \"DOSE NOT CHANGED\", \"DOSE REDUCED\", \"NOT EVALUABLE\" ) tmc_ex_adae <- adae %>% dplyr::mutate( AEACN = factor(ifelse( .data$AETOXGR == \"5\", \"NOT EVALUABLE\", as.character(sample_fct(actions, nrow(adae), prob = c(0.05, 0.05, 0.05, 0.01, 0.05, 0.1, 0.45, 0.1, 0.05))) )) %>% with_label(\"Action Taken With Study Treatment\") ) %>% col_relabel( AEBODSYS = \"Body System or Organ Class\", AELLT = \"Lowest Level Term\", AEDECOD = \"Dictionary-Derived Term\", AEHLT = \"High Level Term\", AEHLGT = \"High Level Group Term\", AETOXGR = \"Analysis Toxicity Grade\", AESOC = \"Primary System Organ Class\", AESER = \"Serious Event\", AEREL = \"Analysis Causality\", AESEQ = \"Sponsor-Defined Identifier\", LDOSEDTM = \"End Time/Time of Last Dose\", CQ01NAM = \"CQ 01 Reference Name\", SMQ01NAM = \"SMQ 01 Reference Name\", SMQ01SC = \"SMQ 01 Scope\", SMQ02NAM = \"SMQ 02 Reference Name\", SMQ02SC = \"SMQ 02 Scope\" ) i_lbls <- sapply( names(col_labels(tmc_ex_adae)[is.na(col_labels(tmc_ex_adae))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adae[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adae, file = \"data/tmc_ex_adae.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adaette","dir":"Articles","previous_headings":"","what":"ADAETTE","title":"Example Data Generation","text":"","code":"generate_adaette <- function(adsl = tmc_ex_adsl) { set.seed(1) lookup_adaette <- tibble::tribble( ~ARM, ~CATCD, ~CAT, ~LAMBDA, ~CNSR_P, \"ARM A\", \"1\", \"any adverse event\", 1 / 80, 0.4, \"ARM B\", \"1\", \"any adverse event\", 1 / 100, 0.2, \"ARM C\", \"1\", \"any adverse event\", 1 / 60, 0.42, \"ARM A\", \"2\", \"any serious adverse event\", 1 / 100, 0.3, \"ARM B\", \"2\", \"any serious adverse event\", 1 / 150, 0.1, \"ARM C\", \"2\", \"any serious adverse event\", 1 / 80, 0.32, \"ARM A\", \"3\", \"a grade 3-5 adverse event\", 1 / 80, 0.2, \"ARM B\", \"3\", \"a grade 3-5 adverse event\", 1 / 100, 0.08, \"ARM C\", \"3\", \"a grade 3-5 adverse event\", 1 / 60, 0.23 ) evntdescr_sel <- \"Preferred Term\" cnsdtdscr_sel <- c( \"Clinical Cut Off\", \"Completion or Discontinuation\", \"End of AE Reporting Period\" ) random_patient_data <- function(patient_info) { startdt <- lubridate::date(patient_info$TRTSDTM) trtedtm <- lubridate::floor_date(dplyr::case_when( is.na(patient_info$TRTEDTM) ~ lubridate::date(patient_info$TRTSDTM) + study_duration_secs, TRUE ~ lubridate::date(patient_info$TRTEDTM) ), unit = \"day\") enddts <- c(patient_info$EOSDT, lubridate::date(trtedtm)) enddts_min_index <- which.min(enddts) adt <- enddts[enddts_min_index] adtm <- lubridate::as_datetime(adt) ady <- as.numeric(adt - startdt + 1) data.frame( ARM = patient_info$ARM, STUDYID = patient_info$STUDYID, SITEID = patient_info$SITEID, USUBJID = patient_info$USUBJID, PARAMCD = \"AEREPTTE\", PARAM = \"Time to end of AE reporting period\", CNSR = 0, AVAL = lubridate::days(ady) / lubridate::years(1), AVALU = \"YEARS\", EVNTDESC = ifelse(enddts_min_index == 1, \"Completion or Discontinuation\", \"End of AE Reporting Period\"), CNSDTDSC = NA, ADTM = adtm, ADY = ady, stringsAsFactors = FALSE ) } paramcd_hy <- c(\"HYSTTEUL\", \"HYSTTEBL\") param_hy <- c(\"Time to Hy's Law Elevation in relation to ULN\", \"Time to Hy's Law Elevation in relation to Baseline\") param_init_list <- relvar_init(param_hy, paramcd_hy) adsl_hy <- dplyr::select(adsl, \"STUDYID\", \"USUBJID\", \"TRTSDTM\", \"SITEID\", \"ARM\") adaette_hy <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), stringsAsFactors = FALSE ) adaette_hy <- dplyr::left_join(adaette_hy, adsl_hy, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\") %>% dplyr::mutate( PARAMCD = factor(rel_var( df = as.data.frame(adaette_hy), var_values = param_init_list$relvar2, related_var = \"PARAM\" )) ) %>% dplyr::mutate( CNSR = sample(c(0, 1), prob = c(0.1, 0.9), size = dplyr::n(), replace = TRUE), EVNTDESC = dplyr::if_else( .data$CNSR == 0, \"First Post-Baseline Raised ALT or AST Elevation Result\", NA_character_ ), CNSDTDSC = dplyr::if_else(.data$CNSR == 0, NA_character_, sample(c(\"Last Post-Baseline ALT or AST Result\", \"Treatment Start\"), prob = c(0.9, 0.1), size = dplyr::n(), replace = TRUE ) ) ) %>% dplyr::rowwise() %>% dplyr::mutate(ADTM = dplyr::case_when( CNSDTDSC == \"Treatment Start\" ~ TRTSDTM, TRUE ~ TRTSDTM + sample(seq(0, study_duration_secs), size = dplyr::n(), replace = TRUE) )) %>% dplyr::mutate( ADY_int = lubridate::date(ADTM) - lubridate::date(TRTSDTM) + 1, ADY = as.numeric(ADY_int), AVAL = lubridate::days(ADY_int) / lubridate::weeks(1), AVALU = \"WEEKS\" ) %>% dplyr::select(-TRTSDTM, -ADY_int) random_ae_data <- function(lookup_info, patient_info, patient_data) { cnsr <- sample(c(0, 1), 1, prob = c(1 - lookup_info$CNSR_P, lookup_info$CNSR_P)) ae_rep_tte <- patient_data$AVAL[patient_data$PARAMCD == \"AEREPTTE\"] data.frame( ARM = rep(patient_data$ARM, 2), STUDYID = rep(patient_data$STUDYID, 2), SITEID = rep(patient_data$SITEID, 2), USUBJID = rep(patient_data$USUBJID, 2), PARAMCD = c( paste0(\"AETTE\", lookup_info$CATCD), paste0(\"AETOT\", lookup_info$CATCD) ), PARAM = c( paste(\"Time to first occurrence of\", lookup_info$CAT), paste(\"Number of occurrences of\", lookup_info$CAT) ), CNSR = c(cnsr, NA), AVAL = c( ifelse(cnsr == 1, ae_rep_tte, rtexp(1, lookup_info$LAMBDA * 365.25, r = ae_rep_tte)), ifelse(cnsr == 1, 0, rtpois(1, lookup_info$LAMBDA * 365.25)) ), AVALU = c(\"YEARS\", NA), EVNTDESC = c(ifelse(cnsr == 0, sample(evntdescr_sel, 1), \"\"), NA), CNSDTDSC = c(ifelse(cnsr == 1, sample(cnsdtdscr_sel, 1), \"\"), NA), stringsAsFactors = FALSE ) %>% dplyr::mutate( ADY = dplyr::if_else(is.na(AVALU), NA_real_, ceiling(as.numeric(lubridate::dyears(AVAL), \"days\"))), ADTM = dplyr::if_else( is.na(AVALU), lubridate::as_datetime(NA), patient_info$TRTSDTM + lubridate::days(ADY) ) ) } adaette <- split(adsl, adsl$USUBJID) %>% lapply(function(patient_info) { patient_data <- random_patient_data(patient_info) lookup_arm <- lookup_adaette %>% dplyr::filter(.data$ARM == as.character(patient_info$ARMCD)) ae_data <- split(lookup_arm, lookup_arm$CATCD) %>% lapply(random_ae_data, patient_data = patient_data, patient_info = patient_info) %>% Reduce(rbind, .) dplyr::bind_rows(patient_data, ae_data) }) %>% Reduce(rbind, .) adaette <- rbind(adaette, adaette_hy) tmc_ex_adaette <- adsl %>% dplyr::inner_join( dplyr::select(adaette, -\"SITEID\", -\"ARM\"), by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::group_by(.data$USUBJID) %>% dplyr::arrange(.data$ADTM) %>% dplyr::mutate(PARAM = as.factor(.data$PARAM)) %>% dplyr::mutate(PARAMCD = as.factor(.data$PARAMCD)) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_adaette)[is.na(col_labels(tmc_ex_adaette))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adaette[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adaette, file = \"data/tmc_ex_adaette.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adcm","dir":"Articles","previous_headings":"","what":"ADCM","title":"Example Data Generation","text":"","code":"generate_adcm <- function(adsl = tmc_ex_adsl, max_n_cms = 5L) { set.seed(1) lookup_cm <- tibble::tribble( ~CMCLAS, ~CMDECOD, ~ATIREL, \"medcl A\", \"medname A_1/3\", \"PRIOR\", \"medcl A\", \"medname A_2/3\", \"CONCOMITANT\", \"medcl A\", \"medname A_3/3\", \"CONCOMITANT\", \"medcl B\", \"medname B_1/4\", \"CONCOMITANT\", \"medcl B\", \"medname B_2/4\", \"PRIOR\", \"medcl B\", \"medname B_3/4\", \"PRIOR\", \"medcl B\", \"medname B_4/4\", \"CONCOMITANT\", \"medcl C\", \"medname C_1/2\", \"CONCOMITANT\", \"medcl C\", \"medname C_2/2\", \"CONCOMITANT\" ) adcm <- Map(function(id, sid) { n_cms <- sample(c(0, seq_len(max_n_cms)), 1) i <- sample(seq_len(nrow(lookup_cm)), n_cms, TRUE) dplyr::mutate( lookup_cm[i, ], USUBJID = id, STUDYID = sid ) }, adsl$USUBJID, adsl$STUDYID) %>% Reduce(rbind, .) %>% `[`(c(4, 5, 1, 2, 3)) %>% dplyr::mutate(CMCAT = .data$CMCLAS %>% with_label(\"Category for Medication\")) # merge adsl to be able to add CM date and study day variables adcm <- dplyr::inner_join( adcm, adsl, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::mutate(ASTDY = ceiling(difftime(ASTDTM, TRTSDTM, units = \"days\"))) %>% # add 1 to end of range incase both values passed to sample() are the same dplyr::mutate(AENDTM = sample( seq(lubridate::as_datetime(ASTDTM), lubridate::as_datetime(TRTENDT + 1), by = \"day\"), size = 1 )) %>% dplyr::mutate(AENDY = ceiling(difftime(AENDTM, TRTSDTM, units = \"days\"))) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(STUDYID, USUBJID, ASTDTM) tmc_ex_adcm <- adcm %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(CMSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$CMSEQ) %>% dplyr::mutate( ATC1 = paste(\"ATCCLAS1\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 1 Text\"), ATC2 = paste(\"ATCCLAS2\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 2 Text\"), ATC3 = paste(\"ATCCLAS3\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 3 Text\"), ATC4 = paste(\"ATCCLAS4\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 4 Text\") ) %>% dplyr::mutate( CMINDC = sample(c( \"Nausea\", \"Hypertension\", \"Urticaria\", \"Fever\", \"Asthma\", \"Infection\", \"Diabete\", \"Diarrhea\", \"Pneumonia\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Indication\"), CMDOSE = sample(1:99, dplyr::n(), replace = TRUE) %>% with_label(\"Dose per Administration\"), CMTRT = substr(.data$CMDECOD, 9, 13) %>% with_label(\"Reported Name of Drug, Med, or Therapy\"), CMDOSU = sample(c( \"ug/mL\", \"ug/kg/day\", \"%\", \"uL\", \"DROP\", \"umol/L\", \"mg\", \"mg/breath\", \"ug\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Dose Units\") ) %>% dplyr::mutate( CMROUTE = sample(c( \"INTRAVENOUS\", \"ORAL\", \"NASAL\", \"INTRAMUSCULAR\", \"SUBCUTANEOUS\", \"INHALED\", \"RECTAL\", \"UNKNOWN\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Route of Administration\"), CMDOSFRQ = sample(c( \"Q4W\", \"QN\", \"Q4H\", \"UNKNOWN\", \"TWICE\", \"Q4H\", \"QD\", \"TID\", \"4 TIMES PER MONTH\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Dosing Frequency per Interval\") ) %>% col_relabel( CMCLAS = \"Medication Class\", CMDECOD = \"Standardized Medication Name\", ATIREL = \"Time Relation of Medication\", CMSEQ = \"Sponsor-Defined Identifier\" ) i_lbls <- sapply( names(col_labels(tmc_ex_adcm)[is.na(col_labels(tmc_ex_adcm))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adcm[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adcm, file = \"data/tmc_ex_adcm.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adeg","dir":"Articles","previous_headings":"","what":"ADEG","title":"Example Data Generation","text":"","code":"generate_adeg <- function(adsl = tmc_ex_adsl, n_assessments = 3L, n_days = 3L, max_n_eg = 3L) { set.seed(1) param <- c(\"QT Duration\", \"RR Duration\", \"Heart Rate\", \"ECG Interpretation\") paramcd <- c(\"QT\", \"RR\", \"HR\", \"ECGINTP\") paramu <- c(\"msec\", \"msec\", \"beats/min\", \"\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) adeg <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), stringsAsFactors = FALSE ) adeg$PARAMCD <- as.factor(rel_var( df = adeg, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) adeg <- adeg %>% dplyr::mutate(AVAL = dplyr::case_when( .data$PARAMCD == \"QT\" ~ stats::rnorm(nrow(adeg), mean = 350, sd = 100), .data$PARAMCD == \"RR\" ~ stats::rnorm(nrow(adeg), mean = 1050, sd = 300), .data$PARAMCD == \"HR\" ~ stats::rnorm(nrow(adeg), mean = 70, sd = 20), .data$PARAMCD == \"ECGINTP\" ~ NA_real_ )) adeg <- adeg %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ )) adeg$AVALU <- as.factor(rel_var( df = adeg, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) adeg <- adeg[order(adeg$STUDYID, adeg$USUBJID, adeg$PARAMCD, adeg$AVISITN), ] adeg <- Reduce(rbind, lapply(split(adeg, adeg$USUBJID), function(x) { x$STUDYID <- adsl$STUDYID[which(adsl$USUBJID == x$USUBJID[1])] x$ABLFL <- ifelse(toupper(visit_format) == \"WEEK\" & x$AVISIT == \"BASELINE\", \"Y\", ifelse(toupper(visit_format) == \"CYCLE\" & x$AVISIT == \"CYCLE 1 DAY 1\", \"Y\", \"\") ) x })) adeg$BASE <- ifelse(adeg$AVISITN >= 0, retain(adeg, adeg$AVAL, adeg$ABLFL == \"Y\"), adeg$AVAL) adeg <- adeg %>% dplyr::mutate(ANRLO = dplyr::case_when( .data$PARAMCD == \"QT\" ~ 200, .data$PARAMCD == \"RR\" ~ 600, .data$PARAMCD == \"HR\" ~ 40, .data$PARAMCD == \"ECGINTP\" ~ NA_real_ )) %>% dplyr::mutate(ANRHI = dplyr::case_when( .data$PARAMCD == \"QT\" ~ 500, .data$PARAMCD == \"RR\" ~ 1500, .data$PARAMCD == \"HR\" ~ 100, .data$PARAMCD == \"ECGINTP\" ~ NA_real_ )) %>% dplyr::mutate(ANRIND = factor(dplyr::case_when( .data$AVAL < .data$ANRLO ~ \"LOW\", .data$AVAL >= .data$ANRLO & .data$AVAL <= .data$ANRHI ~ \"NORMAL\", .data$AVAL > .data$ANRHI ~ \"HIGH\" ))) adeg <- adeg %>% dplyr::mutate(CHG = ifelse(.data$AVISITN > 0, .data$AVAL - .data$BASE, NA)) %>% dplyr::mutate(PCHG = ifelse(.data$AVISITN > 0, 100 * (.data$CHG / .data$BASE), NA)) %>% dplyr::mutate(BASETYPE = \"LAST\") %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::mutate(BNRIND = .data$ANRIND[.data$ABLFL == \"Y\"]) %>% dplyr::ungroup() %>% dplyr::mutate(DTYPE = NA) adeg$ANRIND <- factor(adeg$ANRIND, levels = c(\"LOW\", \"NORMAL\", \"HIGH\")) adeg$BNRIND <- factor(adeg$BNRIND, levels = c(\"LOW\", \"NORMAL\", \"HIGH\")) adeg <- dplyr::inner_join( adsl, adeg, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::ungroup() %>% dplyr::group_by(USUBJID) %>% dplyr::arrange(USUBJID, AVISITN) %>% dplyr::mutate(ADTM = rep( sort(sample( seq(lubridate::as_datetime(TRTSDTM[1]), lubridate::as_datetime(TRTENDT[1]), by = \"day\"), size = nlevels(AVISIT) )), each = n() / nlevels(AVISIT) )) %>% dplyr::ungroup() %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) adeg <- adeg %>% dplyr::group_by(.data$USUBJID) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISITN, .data$DTYPE, .data$ADTM ) adeg <- adeg %>% dplyr::mutate(ONTRTFL = factor(dplyr::case_when( is.na(.data$TRTSDTM) ~ \"\", is.na(.data$ADTM) ~ \"Y\", (.data$ADTM < .data$TRTSDTM) ~ \"\", (.data$ADTM > .data$TRTEDTM) ~ \"\", TRUE ~ \"Y\" ))) %>% dplyr::mutate(AVALC = ifelse( .data$PARAMCD == \"ECGINTP\", as.character(sample_fct(c(\"ABNORMAL\", \"NORMAL\"), nrow(adeg), prob = c(0.25, 0.75))), as.character(.data$AVAL) )) adeg <- adeg %>% dplyr::mutate(row_check = seq_len(nrow(adeg))) get_groups <- function(data, minimum) { data <- data %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::arrange(.data$ADTM) %>% dplyr::filter( (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) %>% { if (minimum == TRUE) { dplyr::filter(., .data$AVAL == min(.data$AVAL)) %>% dplyr::mutate(., DTYPE = \"MINIMUM\", AVISIT = \"POST-BASELINE MINIMUM\") } else { dplyr::filter(., .data$AVAL == max(.data$AVAL)) %>% dplyr::mutate(., DTYPE = \"MAXIMUM\", AVISIT = \"POST-BASELINE MAXIMUM\") } } %>% dplyr::slice(1) %>% dplyr::ungroup() return(data) } lbls <- col_labels(adeg) adeg <- rbind(adeg, get_groups(adeg, TRUE), get_groups(adeg, FALSE)) %>% dplyr::arrange(.data$row_check) %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::arrange(.data$AVISIT, .by_group = TRUE) %>% dplyr::ungroup() col_labels(adeg) <- lbls adeg <- adeg[, -which(names(adeg) %in% c(\"row_check\"))] flag_variables <- function(data, worst_obs) { data_compare <- data %>% dplyr::mutate(row_check = seq_len(nrow(data))) data <- data_compare %>% { if (worst_obs == FALSE) { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISIT) %>% dplyr::arrange(., .data$ADTM) } else { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE) } } %>% dplyr::filter( .data$AVISITN > 0 & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) & is.na(.data$DTYPE) ) %>% { if (worst_obs == TRUE) { dplyr::arrange(., .data$AVALC) %>% dplyr::filter(., ifelse( .data$PARAMCD == \"ECGINTP\", ifelse(.data$AVALC == \"ABNORMAL\", .data$AVALC == \"ABNORMAL\", .data$AVALC == \"NORMAL\"), .data$AVAL == min(.data$AVAL) )) } else { dplyr::filter(., ifelse( .data$PARAMCD == \"ECGINTP\", .data$AVALC == \"ABNORMAL\" | .data$AVALC == \"NORMAL\", .data$AVAL == min(.data$AVAL) )) } } %>% dplyr::slice(1) %>% { if (worst_obs == TRUE) { dplyr::mutate(., new_var = dplyr::case_when( (.data$AVALC == \"ABNORMAL\" | .data$AVALC == \"NORMAL\") ~ \"Y\", (!is.na(.data$AVAL) & is.na(.data$DTYPE)) ~ \"Y\", TRUE ~ \"\" )) } else { dplyr::mutate(., new_var = dplyr::case_when( (.data$AVALC == \"ABNORMAL\" | .data$AVALC == \"NORMAL\") ~ \"Y\", (!is.na(.data$AVAL) & is.na(.data$DTYPE)) ~ \"Y\", TRUE ~ \"\" )) } } %>% dplyr::ungroup() data_compare$new_var <- ifelse(data_compare$row_check %in% data$row_check, \"Y\", \"\") data_compare <- data_compare[, -which(names(data_compare) %in% c(\"row_check\"))] return(data_compare) } adeg <- flag_variables(adeg, FALSE) %>% dplyr::rename(WORS01FL = \"new_var\") adeg <- flag_variables(adeg, TRUE) %>% dplyr::rename(WORS02FL = \"new_var\") tmc_ex_adeg <- adeg %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::mutate(BASEC = ifelse( .data$PARAMCD == \"ECGINTP\", .data$AVALC[.data$AVISIT == \"BASELINE\"], as.character(.data$BASE) )) %>% dplyr::ungroup() %>% col_relabel(BASEC = \"Baseline Character Value\") i_lbls <- sapply( names(col_labels(tmc_ex_adeg)[is.na(col_labels(tmc_ex_adeg))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adeg[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adeg, file = \"data/tmc_ex_adeg.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adex","dir":"Articles","previous_headings":"","what":"ADEX","title":"Example Data Generation","text":"","code":"generate_adex <- function(adsl = tmc_ex_adsl, n_assessments = 3L, n_days = 3L, max_n_exs = 3L) { set.seed(1) param <- c( \"Dose administered during constant dosing interval\", \"Number of doses administered during constant dosing interval\", \"Total dose administered\", \"Total number of doses administered\" ) paramcd <- c(\"DOSE\", \"NDOSE\", \"TDOSE\", \"TNDOSE\") paramu <- c(\"mg\", \" \", \"mg\", \" \") parcat1 <- c(\"INDIVIDUAL\", \"OVERALL\") parcat2 <- c(\"Drug A\", \"Drug B\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) adex <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = c( rep( param_init_list$relvar1[1], length(levels(visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days))) ), rep( param_init_list$relvar1[2], length(levels(visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days))) ), param_init_list$relvar1[3:4] ), stringsAsFactors = FALSE ) adex$PARAMCD <- as.factor(rel_var( df = adex, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) adex$AVALU <- as.factor(rel_var( df = adex, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) adex <- adex %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(PARCAT_ind = sample(c(1, 2), size = 1)) %>% dplyr::mutate(PARCAT2 = ifelse(.data$PARCAT_ind == 1, parcat2[1], parcat2[2])) %>% dplyr::select(-\"PARCAT_ind\") adex <- adex %>% dplyr::mutate(PARCAT1 = dplyr::case_when( (.data$PARAMCD == \"TNDOSE\" | .data$PARAMCD == \"TDOSE\") ~ \"OVERALL\", .data$PARAMCD == \"DOSE\" | .data$PARAMCD == \"NDOSE\" ~ \"INDIVIDUAL\" )) adex_visit <- adex %>% dplyr::filter(.data$PARAMCD == \"DOSE\" | .data$PARAMCD == \"NDOSE\") %>% dplyr::mutate( AVISIT = rep(visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), 2) ) adex <- dplyr::left_join( adex %>% dplyr::group_by( .data$USUBJID, .data$STUDYID, .data$PARAM, .data$PARAMCD, .data$AVALU, .data$PARCAT1, .data$PARCAT2 ) %>% dplyr::mutate(id = dplyr::row_number()), adex_visit %>% dplyr::group_by( .data$USUBJID, .data$STUDYID, .data$PARAM, .data$PARAMCD, .data$AVALU, .data$PARCAT1, .data$PARCAT2 ) %>% dplyr::mutate(id = dplyr::row_number()), by = c(\"USUBJID\", \"STUDYID\", \"PARCAT1\", \"PARCAT2\", \"id\", \"PARAMCD\", \"PARAM\", \"AVALU\") ) %>% dplyr::select(-\"id\") adex <- adex %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ 999000 )) adex2 <- split(adex, adex$USUBJID) %>% lapply(function(pinfo) { pinfo %>% dplyr::filter(.data$PARAMCD == \"DOSE\") %>% dplyr::group_by(.data$USUBJID, .data$PARCAT2, .data$AVISIT) %>% dplyr::mutate(changeind = dplyr::case_when( .data$AVISIT == \"SCREENING\" ~ 0, .data$AVISIT != \"SCREENING\" ~ sample(c(-1, 0, 1), size = 1, prob = c(0.25, 0.5, 0.25), replace = TRUE ) )) %>% dplyr::ungroup() %>% dplyr::group_by(.data$USUBJID, .data$PARCAT2) %>% dplyr::mutate( csum = cumsum(.data$changeind), changeind = dplyr::case_when( .data$csum <= -3 ~ sample(c(0, 1), size = 1, prob = c(0.5, 0.5)), .data$csum >= 3 ~ sample(c(0, -1), size = 1, prob = c(0.5, 0.5)), TRUE ~ .data$changeind ) ) %>% dplyr::mutate(csum = cumsum(.data$changeind)) %>% dplyr::ungroup() %>% dplyr::group_by(.data$USUBJID, .data$PARCAT2, .data$AVISIT) %>% dplyr::mutate(AVAL = dplyr::case_when( .data$csum == -2 ~ 480, .data$csum == -1 ~ 720, .data$csum == 0 ~ 960, .data$csum == 1 ~ 1200, .data$csum == 2 ~ 1440 )) %>% dplyr::select(-c(\"csum\", \"changeind\")) %>% dplyr::ungroup() }) %>% Reduce(rbind, .) adextmp <- dplyr::full_join(adex2, adex, by = names(adex)) adex <- adextmp %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(AVAL = ifelse(.data$PARAMCD == \"NDOSE\", 1, .data$AVAL)) %>% dplyr::mutate(AVAL = ifelse( .data$PARAMCD == \"TNDOSE\", sum(.data$AVAL[.data$PARAMCD == \"NDOSE\"]), .data$AVAL )) %>% dplyr::ungroup() %>% dplyr::group_by(.data$USUBJID, .data$STUDYID, .data$PARCAT2) %>% dplyr::mutate(AVAL = ifelse( .data$PARAMCD == \"TDOSE\", sum(.data$AVAL[.data$PARAMCD == \"DOSE\"]), .data$AVAL )) adex <- dplyr::inner_join(adsl, adex, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\") %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM) adex <- adex %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(EXSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ASTDTM, .data$AVISITN ) %>% col_relabel( PARCAT1 = \"Parameter Category (Individual/Overall)\", PARCAT2 = \"Parameter Category (Drug A/Drug B)\", EXSEQ = \"Analysis Sequence Number\" ) visit_levels <- str_extract(levels(adex$AVISIT), pattern = \"[0-9]+\") vl_extracted <- vapply(visit_levels, function(x) as.numeric(x[2]), numeric(1)) vl_extracted <- c(-1, 1, vl_extracted[!is.na(vl_extracted)]) tmc_ex_adex <- adex %>% dplyr::mutate(VISITDY = as.numeric(as.character(factor(AVISIT, labels = vl_extracted)))) %>% dplyr::mutate(ASTDTM = lubridate::as_datetime(TRTSDTM) + lubridate::days(VISITDY)) %>% dplyr::distinct(USUBJID, .keep_all = TRUE) i_lbls <- sapply( names(col_labels(tmc_ex_adex)[is.na(col_labels(tmc_ex_adex))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adex[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adex, file = \"data/tmc_ex_adex.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adlb","dir":"Articles","previous_headings":"","what":"ADLB","title":"Example Data Generation","text":"","code":"generate_adlb <- function(adsl = tmc_ex_adsl, n_assessments = 3L, n_days = 3L, max_n_lbs = 3L) { set.seed(1) lbcat <- c(\"CHEMISTRY\", \"CHEMISTRY\", \"IMMUNOLOGY\") param <- c( \"Alanine Aminotransferase Measurement\", \"C-Reactive Protein Measurement\", \"Immunoglobulin A Measurement\" ) paramcd <- c(\"ALT\", \"CRP\", \"IGA\") paramu <- c(\"U/L\", \"mg/L\", \"g/L\") aval_mean <- c(20, 1, 2) visit_format <- \"WEEK\" # validate and initialize related variables lbcat_init_list <- relvar_init(param, lbcat) param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) adlb <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), stringsAsFactors = FALSE ) # assign AVAL based on different test adlb <- adlb %>% dplyr::mutate(AVAL = stats::rnorm(nrow(adlb), mean = 1, sd = 0.2)) %>% dplyr::left_join(data.frame(PARAM = param, ADJUST = aval_mean), by = \"PARAM\") %>% dplyr::mutate(AVAL = .data$AVAL * .data$ADJUST) %>% dplyr::select(-\"ADJUST\") # assign related variable values: PARAMxLBCAT are related adlb$LBCAT <- as.factor(rel_var( df = adlb, var_name = \"LBCAT\", var_values = lbcat_init_list$relvar2, related_var = \"PARAM\" )) # assign related variable values: PARAMxPARAMCD are related adlb$PARAMCD <- as.factor(rel_var( df = adlb, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) adlb$AVALU <- as.factor(rel_var( df = adlb, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) adlb <- adlb %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ )) adlb <- adlb %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ )) # order to prepare for change from screening and baseline values adlb <- adlb[order(adlb$STUDYID, adlb$USUBJID, adlb$PARAMCD, adlb$AVISITN), ] adlb <- Reduce(rbind, lapply(split(adlb, adlb$USUBJID), function(x) { x$STUDYID <- adsl$STUDYID[which(adsl$USUBJID == x$USUBJID[1])] x$ABLFL2 <- ifelse(x$AVISIT == \"SCREENING\", \"Y\", \"\") x$ABLFL <- ifelse(toupper(visit_format) == \"WEEK\" & x$AVISIT == \"BASELINE\", \"Y\", ifelse(toupper(visit_format) == \"CYCLE\" & x$AVISIT == \"CYCLE 1 DAY 1\", \"Y\", \"\") ) x })) adlb$BASE <- ifelse(adlb$ABLFL2 != \"Y\", retain(adlb, adlb$AVAL, adlb$ABLFL == \"Y\"), NA) anrind_choices <- c(\"HIGH\", \"LOW\", \"NORMAL\") adlb <- adlb %>% dplyr::mutate(BASETYPE = \"LAST\") %>% dplyr::mutate(ANRIND = sample_fct(anrind_choices, nrow(adlb), prob = c(0.1, 0.1, 0.8))) %>% dplyr::mutate(ANRLO = dplyr::case_when( .data$PARAMCD == \"ALT\" ~ 7, .data$PARAMCD == \"CRP\" ~ 8, .data$PARAMCD == \"IGA\" ~ 0.8 )) %>% dplyr::mutate(ANRHI = dplyr::case_when( .data$PARAMCD == \"ALT\" ~ 55, .data$PARAMCD == \"CRP\" ~ 10, .data$PARAMCD == \"IGA\" ~ 3 )) %>% dplyr::mutate(DTYPE = NA) %>% dplyr::mutate( ATOXGR = factor(dplyr::case_when( .data$ANRIND == \"LOW\" ~ sample( c(\"-1\", \"-2\", \"-3\", \"-4\", \"-5\"), nrow(adlb), replace = TRUE, prob = c(0.30, 0.25, 0.20, 0.15, 0) ), .data$ANRIND == \"HIGH\" ~ sample( c(\"1\", \"2\", \"3\", \"4\", \"5\"), nrow(adlb), replace = TRUE, prob = c(0.30, 0.25, 0.20, 0.15, 0) ), .data$ANRIND == \"NORMAL\" ~ \"0\" )) %>% with_label(\"Analysis Toxicity Grade\") ) %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::mutate(BTOXGR = .data$ATOXGR[.data$ABLFL == \"Y\"]) %>% dplyr::ungroup() %>% col_relabel(BTOXGR = \"Baseline Toxicity Grade\") # High and low descriptions of the different PARAMCD values # This is currently hard coded as the GDSR does not have these descriptions yet grade_lookup <- tibble::tribble( ~PARAMCD, ~ATOXDSCL, ~ATOXDSCH, \"ALB\", \"Hypoalbuminemia\", NA_character_, \"ALKPH\", NA_character_, \"Alkaline phosphatase increased\", \"ALT\", NA_character_, \"Alanine aminotransferase increased\", \"AST\", NA_character_, \"Aspartate aminotransferase increased\", \"BILI\", NA_character_, \"Blood bilirubin increased\", \"CA\", \"Hypocalcemia\", \"Hypercalcemia\", \"CHOLES\", NA_character_, \"Cholesterol high\", \"CK\", NA_character_, \"CPK increased\", \"CREAT\", NA_character_, \"Creatinine increased\", \"CRP\", NA_character_, \"C reactive protein increased\", \"GGT\", NA_character_, \"GGT increased\", \"GLUC\", \"Hypoglycemia\", \"Hyperglycemia\", \"HGB\", \"Anemia\", \"Hemoglobin increased\", \"IGA\", NA_character_, \"Immunoglobulin A increased\", \"POTAS\", \"Hypokalemia\", \"Hyperkalemia\", \"LYMPH\", \"CD4 lymphocytes decreased\", NA_character_, \"PHOS\", \"Hypophosphatemia\", NA_character_, \"PLAT\", \"Platelet count decreased\", NA_character_, \"SODIUM\", \"Hyponatremia\", \"Hypernatremia\", \"WBC\", \"White blood cell decreased\", \"Leukocytosis\", ) # merge grade_lookup onto adlb adlb <- dplyr::left_join(adlb, grade_lookup, by = \"PARAMCD\") # merge adsl to be able to add LB date and study day variables adlb <- dplyr::inner_join( adsl, adlb, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::ungroup() %>% dplyr::group_by(USUBJID) %>% dplyr::arrange(USUBJID, AVISITN) %>% dplyr::mutate(ADTM = rep( sort(sample( seq(lubridate::as_datetime(TRTSDTM[1]), lubridate::as_datetime(TRTENDT[1]), by = \"day\"), size = nlevels(AVISIT) )), each = n() / nlevels(AVISIT) )) %>% dplyr::ungroup() %>% dplyr::select(-TRTENDT) %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) adlb <- adlb %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(LBSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISITN, .data$DTYPE, .data$ADTM, .data$LBSEQ ) %>% col_relabel(LBSEQ = \"Lab Test or Examination Sequence Number\") adlb <- adlb %>% dplyr::mutate(ONTRTFL = factor(dplyr::case_when( is.na(.data$TRTSDTM) ~ \"\", is.na(.data$ADTM) ~ \"Y\", (.data$ADTM < .data$TRTSDTM) ~ \"\", (.data$ADTM > .data$TRTEDTM) ~ \"\", TRUE ~ \"Y\" ))) flag_variables <- function(data, apply_grouping, apply_filter, apply_mutate) { data_compare <- data %>% dplyr::mutate(row_check = seq_len(nrow(data))) data <- data_compare %>% { if (apply_grouping == TRUE) { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISIT) } else { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE) } } %>% dplyr::arrange(.data$ADTM, .data$LBSEQ) %>% { if (apply_filter == TRUE) { dplyr::filter( ., (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) %>% dplyr::filter(.data$ATOXGR == max(as.numeric(as.character(.data$ATOXGR)))) } else if (apply_filter == FALSE) { dplyr::filter( ., (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) %>% dplyr::filter(.data$ATOXGR == min(as.numeric(as.character(.data$ATOXGR)))) } else { dplyr::filter( ., .data$AVAL == min(.data$AVAL) & (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) } } %>% dplyr::slice(1) %>% { if (apply_mutate == TRUE) { dplyr::mutate(., new_var = ifelse(is.na(.data$DTYPE), \"Y\", \"\")) } else { dplyr::mutate(., new_var = ifelse(is.na(.data$AVAL) == FALSE & is.na(.data$DTYPE), \"Y\", \"\")) } } %>% dplyr::ungroup() data_compare$new_var <- ifelse(data_compare$row_check %in% data$row_check, \"Y\", \"\") data_compare <- data_compare[, -which(names(data_compare) %in% c(\"row_check\"))] return(data_compare) } adlb <- flag_variables(adlb, TRUE, \"ELSE\", FALSE) %>% dplyr::rename(WORS01FL = \"new_var\") adlb <- flag_variables(adlb, FALSE, TRUE, TRUE) %>% dplyr::rename(WGRHIFL = \"new_var\") adlb <- flag_variables(adlb, FALSE, FALSE, TRUE) %>% dplyr::rename(WGRLOFL = \"new_var\") adlb <- flag_variables(adlb, TRUE, TRUE, TRUE) %>% dplyr::rename(WGRHIVFL = \"new_var\") adlb <- flag_variables(adlb, TRUE, FALSE, TRUE) %>% dplyr::rename(WGRLOVFL = \"new_var\") tmc_ex_adlb <- adlb %>% dplyr::mutate( ANL01FL = ifelse( (.data$ABLFL == \"Y\" | (.data$WORS01FL == \"Y\" & is.na(.data$DTYPE))) & (.data$AVISIT != \"SCREENING\"), \"Y\", \"\" ) %>% with_label(\"Analysis Flag 01 Baseline Post-Baseline\"), PARAM = as.factor(.data$PARAM) ) tmc_ex_adlb <- tmc_ex_adlb %>% group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% mutate(BNRIND = .data$ANRIND[.data$ABLFL == \"Y\"]) %>% ungroup() %>% dplyr::mutate(ADY = ceiling(as.numeric(difftime(.data$ADTM, .data$TRTSDTM, units = \"days\")))) tmc_ex_adlb$PARAMCD <- as.factor(tmc_ex_adlb$PARAMCD) tmc_ex_adlb <- tmc_ex_adlb %>% dplyr::mutate(CHG = .data$AVAL - .data$BASE) %>% dplyr::mutate(PCHG = 100 * (.data$CHG / .data$BASE)) %>% col_relabel( LBCAT = \"Category for Lab Test\", ATOXDSCL = \"Analysis Toxicity Description Low\", ATOXDSCH = \"Analysis Toxicity Description High\", WGRHIFL = \"Worst High Grade per Patient\", WGRLOFL = \"Worst Low Grade per Patient\", WGRHIVFL = \"Worst High Grade per Patient per Visit\", WGRLOVFL = \"Worst Low Grade per Patient per Visit\" ) i_lbls <- sapply( names(col_labels(tmc_ex_adlb)[is.na(col_labels(tmc_ex_adlb))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adlb[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adlb, file = \"data/tmc_ex_adlb.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"admh","dir":"Articles","previous_headings":"","what":"ADMH","title":"Example Data Generation","text":"","code":"generate_admh <- function(adsl = tmc_ex_adsl, max_n_mhs = 10L) { set.seed(1) lookup_mh <- tibble::tribble( ~MHBODSYS, ~MHDECOD, ~MHSOC, \"cl A\", \"trm A_1/2\", \"cl A\", \"cl A\", \"trm A_2/2\", \"cl A\", \"cl B\", \"trm B_1/3\", \"cl B\", \"cl B\", \"trm B_2/3\", \"cl B\", \"cl B\", \"trm B_3/3\", \"cl B\", \"cl C\", \"trm C_1/2\", \"cl C\", \"cl C\", \"trm C_2/2\", \"cl C\", \"cl D\", \"trm D_1/3\", \"cl D\", \"cl D\", \"trm D_2/3\", \"cl D\", \"cl D\", \"trm D_3/3\", \"cl D\" ) admh <- Map( function(id, sid) { n_mhs <- sample(0:max_n_mhs, 1) i <- sample(seq_len(nrow(lookup_mh)), n_mhs, TRUE) dplyr::mutate( lookup_mh[i, ], USUBJID = id, STUDYID = sid ) }, adsl$USUBJID, adsl$STUDYID ) %>% Reduce(rbind, .) %>% `[`(c(4, 5, 1, 2, 3)) %>% dplyr::mutate(MHTERM = .data$MHDECOD %>% with_label(\"Reported Term for the Medical History\")) admh <- dplyr::inner_join( adsl, admh, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$MHTERM) %>% dplyr::mutate(MHDISTAT = sample( x = c(\"Resolved\", \"Ongoing with treatment\", \"Ongoing without treatment\"), prob = c(0.6, 0.2, 0.2), size = dplyr::n(), replace = TRUE ) %>% with_label(\"Status of Disease\")) tmc_ex_admh <- admh %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(MHSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM) %>% col_relabel( MHBODSYS = \"Body System or Organ Class\", MHDECOD = \"Dictionary-Derived Term\", MHSOC = \"Primary System Organ Class\", MHSEQ = \"Sponsor-Defined Identifier\" ) i_lbls <- sapply( names(col_labels(tmc_ex_admh)[is.na(col_labels(tmc_ex_admh))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_admh[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_admh, file = \"data/tmc_ex_admh.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adqs","dir":"Articles","previous_headings":"","what":"ADQS","title":"Example Data Generation","text":"","code":"generate_adqs <- function(adsl = tmc_ex_adsl, n_assessments = 5L, n_days = 5L) { set.seed(1) param <- c( \"BFI All Questions\", \"Fatigue Interference\", \"Function/Well-Being (GF1,GF3,GF7)\", \"Treatment Side Effects (GP2,C5,GP5)\", \"FKSI-19 All Questions\" ) paramcd <- c(\"BFIALL\", \"FATIGI\", \"FKSI-FWB\", \"FKSI-TSE\", \"FKSIALL\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) adqs <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = param_init_list$relvar1, AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), stringsAsFactors = FALSE ) adqs <- dplyr::mutate( adqs, AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ ) ) adqs$PARAMCD <- rel_var(df = adqs, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\") adqs$AVAL <- stats::rnorm(nrow(adqs), mean = 50, sd = 8) + adqs$AVISITN * stats::rnorm(nrow(adqs), mean = 5, sd = 2) adqs <- adqs[order(adqs$STUDYID, adqs$USUBJID, adqs$PARAMCD, adqs$AVISITN), ] adqs <- Reduce( rbind, lapply( split(adqs, adqs$USUBJID), function(x) { x$STUDYID <- adsl$STUDYID[which(adsl$USUBJID == x$USUBJID[1])] x$ABLFL2 <- ifelse(x$AVISIT == \"SCREENING\", \"Y\", \"\") x$ABLFL <- ifelse( toupper(visit_format) == \"WEEK\" & x$AVISIT == \"BASELINE\", \"Y\", ifelse( toupper(visit_format) == \"CYCLE\" & x$AVISIT == \"CYCLE 1 DAY 1\", \"Y\", \"\" ) ) x } ) ) adqs$BASE <- ifelse(adqs$ABLFL2 != \"Y\", retain(adqs, adqs$AVAL, adqs$ABLFL == \"Y\"), NA) adqs <- adqs %>% dplyr::mutate(CHG = .data$AVAL - .data$BASE) adqs <- dplyr::inner_join( adsl, adqs, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% ungroup() %>% group_by(USUBJID) %>% arrange(USUBJID, AVISITN) %>% dplyr::mutate(ADTM = rep( sort(sample( seq(lubridate::as_datetime(TRTSDTM[1]), lubridate::as_datetime(TRTENDT[1]), by = \"day\"), size = nlevels(AVISIT) )), each = n() / nlevels(AVISIT) )) %>% dplyr::ungroup() %>% dplyr::select(-TRTENDT) %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) tmc_ex_adqs <- adqs %>% dplyr::group_by(.data$USUBJID) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$AVISITN, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_adqs)[is.na(col_labels(tmc_ex_adqs))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adqs[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adqs, file = \"data/tmc_ex_adqs.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adrs","dir":"Articles","previous_headings":"","what":"ADRS","title":"Example Data Generation","text":"","code":"generate_adrs <- function(adsl = tmc_ex_adsl) { set.seed(1) param_codes <- stats::setNames(1:5, c(\"CR\", \"PR\", \"SD\", \"PD\", \"NE\")) lookup_ars <- expand.grid( ARM = c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), AVALC = names(param_codes) ) %>% dplyr::mutate( AVAL = param_codes[.data$AVALC], p_scr = c(rep(0, 3), rep(0, 3), c(1, 1, 1), c(0, 0, 0), c(0, 0, 0)), p_bsl = c(rep(0, 3), rep(0, 3), c(1, 1, 1), c(0, 0, 0), c(0, 0, 0)), p_cycle = c(c(.35, .25, .4), c(.30, .20, .20), c(.2, .25, .3), c(.14, 0.20, 0.18), c(.01, 0.1, 0.02)), p_eoi = c(c(.35, .25, .4), c(.30, .20, .20), c(.2, .25, .3), c(.14, 0.20, 0.18), c(.01, 0.1, 0.02)), p_fu = c(c(.25, .15, .3), c(.15, .05, .25), c(.3, .25, .3), c(.3, .55, .25), rep(0, 3)) ) adrs <- split(adsl, adsl$USUBJID) %>% lapply(function(pinfo) { probs <- dplyr::filter(lookup_ars, .data$ARM == as.character(pinfo$ACTARM)) # screening rsp_screen <- sample(probs$AVALC, 1, prob = probs$p_scr) %>% as.character() # baseline rsp_bsl <- sample(probs$AVALC, 1, prob = probs$p_bsl) %>% as.character() # cycle rsp_c2d1 <- sample(probs$AVALC, 1, prob = probs$p_cycle) %>% as.character() rsp_c4d1 <- sample(probs$AVALC, 1, prob = probs$p_cycle) %>% as.character() # end of induction rsp_eoi <- sample(probs$AVALC, 1, prob = probs$p_eoi) %>% as.character() # follow up rsp_fu <- sample(probs$AVALC, 1, prob = probs$p_fu) %>% as.character() best_rsp <- min(param_codes[c(rsp_screen, rsp_bsl, rsp_eoi, rsp_fu, rsp_c2d1, rsp_c4d1)]) best_rsp_i <- which.min(param_codes[c(rsp_screen, rsp_bsl, rsp_eoi, rsp_fu, rsp_c2d1, rsp_c4d1)]) avisit <- c(\"SCREENING\", \"BASELINE\", \"CYCLE 2 DAY 1\", \"CYCLE 4 DAY 1\", \"END OF INDUCTION\", \"FOLLOW UP\") # meaningful date information TRTSTDT <- lubridate::date(pinfo$TRTSDTM) TRTENDT <- lubridate::date(dplyr::if_else( !is.na(pinfo$TRTEDTM), pinfo$TRTEDTM, lubridate::floor_date(TRTSTDT + study_duration_secs, unit = \"day\") )) scr_date <- TRTSTDT - lubridate::days(100) bs_date <- TRTSTDT flu_date <- sample(seq(lubridate::as_datetime(TRTSTDT), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1) eoi_date <- sample(seq(lubridate::as_datetime(TRTSTDT), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1) c2d1_date <- sample(seq(lubridate::as_datetime(TRTSTDT), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1) c4d1_date <- min(lubridate::date(c2d1_date + lubridate::days(60)), TRTENDT) tibble::tibble( STUDYID = pinfo$STUDYID, USUBJID = pinfo$USUBJID, PARAMCD = as.factor(c(rep(\"OVRINV\", 6), \"BESRSPI\", \"INVET\")), PARAM = as.factor(dplyr::recode( .data$PARAMCD, OVRINV = \"Overall Response by Investigator - by visit\", OVRSPI = \"Best Overall Response by Investigator (no confirmation required)\", BESRSPI = \"Best Confirmed Overall Response by Investigator\", INVET = \"Investigator End Of Induction Response\" )), AVALC = c( rsp_screen, rsp_bsl, rsp_c2d1, rsp_c4d1, rsp_eoi, rsp_fu, names(param_codes)[best_rsp], rsp_eoi ), AVAL = param_codes[.data$AVALC], AVISIT = factor(c(avisit, avisit[best_rsp_i], avisit[5]), levels = avisit) ) %>% merge( tibble::tibble( AVISIT = avisit, ADTM = c(scr_date, bs_date, c2d1_date, c4d1_date, eoi_date, flu_date), AVISITN = c(-1, 0, 2, 4, 999, 999), TRTSDTM = pinfo$TRTSDTM ) %>% dplyr::select(-\"TRTSDTM\"), by = \"AVISIT\" ) }) %>% Reduce(rbind, .) %>% dplyr::mutate( AVALC = factor(.data$AVALC, levels = names(param_codes)), DTHFL = factor(sample(c(\"Y\", \"N\"), nrow(.), replace = TRUE, prob = c(1, 0.8))) %>% with_label(\"Death Flag\") ) # merge ADSL to be able to add RS date and study day variables adrs <- dplyr::inner_join( adsl, adrs, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) tmc_ex_adrs <- adrs %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$AVISITN, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_adrs)[is.na(col_labels(tmc_ex_adrs))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adrs[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adrs, file = \"data/tmc_ex_adrs.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"adtte","dir":"Articles","previous_headings":"","what":"ADTTE","title":"Example Data Generation","text":"","code":"generate_adtte <- function(adsl = tmc_ex_adsl) { set.seed(1) lookup_tte <- tibble::tribble( ~ARM, ~PARAMCD, ~PARAM, ~LAMBDA, ~CNSR_P, \"ARM A\", \"OS\", \"Overall Survival\", log(2) / 610, 0.4, \"ARM B\", \"OS\", \"Overall Survival\", log(2) / 490, 0.3, \"ARM C\", \"OS\", \"Overall Survival\", log(2) / 365, 0.2, \"ARM A\", \"PFS\", \"Progression Free Survival\", log(2) / 365, 0.4, \"ARM B\", \"PFS\", \"Progression Free Survival\", log(2) / 305, 0.3, \"ARM C\", \"PFS\", \"Progression Free Survival\", log(2) / 243, 0.2, \"ARM A\", \"EFS\", \"Event Free Survival\", log(2) / 365, 0.4, \"ARM B\", \"EFS\", \"Event Free Survival\", log(2) / 305, 0.3, \"ARM C\", \"EFS\", \"Event Free Survival\", log(2) / 243, 0.2, \"ARM A\", \"CRSD\", \"Duration of Confirmed Response\", log(2) / 305, 0.4, \"ARM B\", \"CRSD\", \"Duration of Confirmed Response\", log(2) / 243, 0.3, \"ARM C\", \"CRSD\", \"Duration of Confirmed Response\", log(2) / 182, 0.2 ) evntdescr_sel <- c( \"Death\", \"Disease Progression\", \"Last Tumor Assessment\", \"Adverse Event\", \"Last Date Known To Be Alive\" ) cnsdtdscr_sel <- c( \"Preferred Term\", \"Clinical Cut Off\", \"Completion or Discontinuation\", \"End of AE Reporting Period\" ) adtte <- split(adsl, adsl$USUBJID) %>% lapply(FUN = function(pinfo) { lookup_tte %>% dplyr::filter(.data$ARM == as.character(pinfo$ACTARMCD)) %>% dplyr::rowwise() %>% dplyr::mutate( STUDYID = pinfo$STUDYID, USUBJID = pinfo$USUBJID, CNSR = sample(c(0, 1), 1, prob = c(1 - .data$CNSR_P, .data$CNSR_P)), AVAL = stats::rexp(1, .data$LAMBDA), AVALU = \"DAYS\", EVNTDESC = if (.data$CNSR == 1) { sample(evntdescr_sel[-c(1:2)], 1) } else { ifelse(.data$PARAMCD == \"OS\", sample(evntdescr_sel[1], 1), sample(evntdescr_sel[c(1:2)], 1) ) } ) %>% dplyr::select(-\"LAMBDA\", -\"CNSR_P\") }) %>% Reduce(rbind, .) # merge ADSL to be able to add TTE date and study day variables adtte <- dplyr::inner_join( adsl, dplyr::select(adtte, -\"ARM\"), by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ADTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) adtte <- adtte %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(PARAM = as.factor(.data$PARAM)) %>% dplyr::mutate(PARAMCD = as.factor(.data$PARAMCD)) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ADTM ) lbls <- col_labels(adtte) # adding adverse event counts and log follow-up time tmc_ex_adtte <- dplyr::bind_rows( adtte, data.frame(adtte %>% dplyr::group_by(.data$USUBJID) %>% dplyr::slice_head(n = 1) %>% dplyr::mutate( PARAMCD = \"TNE\", PARAM = \"Total Number of Exacerbations\", AVAL = stats::rpois(1, 3), AVALU = \"COUNT\", lgTMATRSK = log(stats::rexp(1, rate = 3)), dplyr::across(c(\"ADTM\", \"EVNTDESC\"), ~NA) )) ) %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ADTM ) col_labels(tmc_ex_adtte) <- c(lbls, lgTMATRSK = \"Log Time At Risk\") i_lbls <- sapply( names(col_labels(tmc_ex_adtte)[is.na(col_labels(tmc_ex_adtte))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adtte[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adtte, file = \"data/tmc_ex_adtte.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"advs","dir":"Articles","previous_headings":"","what":"ADVS","title":"Example Data Generation","text":"","code":"generate_advs <- function(adsl = tmc_ex_adsl, n_assessments = 5L, n_days = 5L) { set.seed(1) param <- c( \"Diastolic Blood Pressure\", \"Pulse Rate\", \"Respiratory Rate\", \"Systolic Blood Pressure\", \"Temperature\", \"Weight\" ) paramcd <- c(\"DIABP\", \"PULSE\", \"RESP\", \"SYSBP\", \"TEMP\", \"WEIGHT\") paramu <- c(\"Pa\", \"beats/min\", \"breaths/min\", \"Pa\", \"C\", \"Kg\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) advs <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments), stringsAsFactors = FALSE ) advs <- dplyr::mutate( advs, AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ ) ) advs$PARAMCD <- as.factor(rel_var( df = advs, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) advs$AVALU <- as.factor(rel_var( df = advs, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) advs$AVAL <- stats::rnorm(nrow(advs), mean = 50, sd = 8) advs <- advs[order(advs$STUDYID, advs$USUBJID, advs$PARAMCD, advs$AVISITN), ] advs <- dplyr::inner_join( adsl, advs, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ADTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::mutate(ADY = ceiling(difftime(ADTM, TRTSDTM, units = \"days\"))) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) tmc_ex_advs <- advs %>% dplyr::group_by(.data$USUBJID) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$AVISITN, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_advs)[is.na(col_labels(tmc_ex_advs))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_advs[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_advs, file = \"data/tmc_ex_advs.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/generate_tmc_test_data.html","id":"generate-data","dir":"Articles","previous_headings":"","what":"Generate Data","title":"Example Data Generation","text":"","code":"# Generate & load adsl tmp_fol <- getwd() setwd(dirname(tmp_fol)) generate_adsl() load(\"data/tmc_ex_adsl.rda\") # Generate other datasets generate_adae() generate_adaette() generate_adcm() generate_adeg() generate_adex() generate_adlb() generate_admh() generate_adqs() generate_adrs() generate_adtte() generate_advs() setwd(tmp_fol)"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"section","dir":"Articles","previous_headings":"","what":"Quick start: `substitute` for NSE","title":"Quick start: `substitute` for NSE","text":"Considering expression, R usually evaluates returns value. Instead focusing value, also possible work code generated value. non standard evaluation, NSE, starts. function substitute important element non-standard evaluation. instance, consider defined <- 5, expression returns 5, substitute() returns code obtain value: . principle teal relies : generate expressions. return result expression result panel app. return corresponding code (expression) Show R Code. expression returning displayed value must reactive. information encoding one hand, filtering panel hand modify expression displayed value. , teal needs work expressions values relies heavily NSE. NSE advanced notion mixing Shiny app development source difficulties : hindered coding efficiency Shiny app must run order check correct execution code. limited possibilities testing. alternative, possible focus first NSE aspects plain R, ready, integrate Shiny App. following practical examples demonstrating NSE works. choice made focus substitute.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"nse-principle","dir":"Articles","previous_headings":"The Basics","what":"NSE Principle","title":"Quick start: `substitute` for NSE","text":"happened? substitute returns code value, attempt run code, therefore possible return expression make sense (yet), instance involving two non defined objects. values b exist, expression can run without error: Now, function name substitute reason. returning expression, also operates substitutions terms within given expression. happened? objects b exist function environment substitute called. terms expression within substitute replaced values b. Indeed, returning expression, substitute verifies b don’t value existing evaluation environment. , values b used expression. also possible use second argument substitute, env, environment (list) containing objects. expression submitted substitute corresponding objects env, terms within expression substituted provided values: happened? environment values b taken directly declared within substitute expression (argument expr) values substituted (argument env). substitute returned non-evaluated expression, use eval() evaluate . slightly elaborate expression: Note : x argument name plot preserved, x object replaced.","code":"non_evaluated_expression <- substitute(expr = a + b) non_evaluated_expression ## a + b eval(non_evaluated_expression) ## Error in eval(non_evaluated_expression): object 'b' not found non_evaluated_expression <- substitute(expr = a + b) a <- 1 b <- 5 eval(non_evaluated_expression) ## [1] 6 fun <- function(a, b) { substitute(expr = a + b) } non_evaluated_expression <- fun(5, -2) non_evaluated_expression ## 5 + -2 eval(non_evaluated_expression) ## [1] 3 non_evaluated_expression <- substitute( expr = a + b, env = list(a = 5, b = 5) ) non_evaluated_expression ## 5 + 5 eval(non_evaluated_expression) ## [1] 10 non_evaluated_expression <- substitute( expr = plot(x = x, y = exp(x), main = text), env = list(x = 0:10, text = \"A graph\") ) non_evaluated_expression ## plot(x = 0:10, y = exp(0:10), main = \"A graph\") eval(non_evaluated_expression)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"replace-an-object-name","dir":"Articles","previous_headings":"The Basics","what":"Replace an object name","title":"Quick start: `substitute` for NSE","text":"formulas, character strings accepted, execute substitution? object names specific class (name); .names coerces character string object name (alternatively, .symbol provides identical result):","code":"# Error expected: plot_expr <- substitute( expr = plot(y ~ x, data = iris, main = text), env = list( x = Sepal.Length, y = Sepal.Width, text = \"Iris, again ...\" ) ) ## Error: object 'Sepal.Length' not found # Error expected: plot_expr <- substitute( expr = plot(y ~ x, data = iris, main = text), env = list( x = \"Sepal.Length\", y = \"Sepal.Width\", text = \"Iris, again ...\" ) ) plot_expr ## plot(\"Sepal.Width\" ~ \"Sepal.Length\", data = iris, main = \"Iris, again ...\") eval(plot_expr) ## Error in terms.formula(formula, data = data): invalid term in model formula plot_expr <- substitute( expr = plot(y ~ x, data = iris, main = text), env = list( x = as.name(\"Sepal.Length\"), y = as.symbol(\"Sepal.Width\"), text = \"Iris, again ...\" ) ) plot_expr ## plot(Sepal.Width ~ Sepal.Length, data = iris, main = \"Iris, again ...\") eval(plot_expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"what-about-dataframe-names","dir":"Articles","previous_headings":"The Basics","what":"What about dataframe names?","title":"Quick start: `substitute` for NSE","text":"Lets imagine pipe-flavored expression, df term corresponding dataframe substituted: df %>% plot(y ~ x, data = ., main = text). principle exposed can work directly without addition. However, df expression replaced directly value object provided expression generating dataframe: pipeline working humanly readable. can replace value expression generating value? pretty much topic vignette: substitute.","code":"library(dplyr) ## Error in get(paste0(generic, \".\", class), envir = get_method_env()) : ## object 'type_sum.accel' not found ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union short_iris <- head(iris) plot_expr <- substitute( expr = df %>% plot(y ~ x, data = ., main = text), env = list( df = short_iris, x = as.name(\"Sepal.Length\"), y = as.symbol(\"Sepal.Width\"), text = \"Iris, again ...\" ) ) eval(plot_expr) plot_expr ## list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4), Sepal.Width = c(3.5, ## 3, 3.2, 3.1, 3.6, 3.9), Petal.Length = c(1.4, 1.4, 1.3, 1.5, ## 1.4, 1.7), Petal.Width = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.4), Species = c(1L, ## 1L, 1L, 1L, 1L, 1L)) %>% plot(Sepal.Width ~ Sepal.Length, data = ., ## main = \"Iris, again ...\") plot_expr <- substitute( expr = df %>% plot(y ~ x, data = ., main = text), env = list( df = substitute(iris), x = as.name(\"Sepal.Length\"), y = as.symbol(\"Sepal.Width\"), text = \"Iris, again ...\" ) ) plot_expr ## iris %>% plot(Sepal.Width ~ Sepal.Length, data = ., main = \"Iris, again ...\") eval(plot_expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"in-a-nutshell","dir":"Articles","previous_headings":"The Basics","what":"In a nutshell","title":"Quick start: `substitute` for NSE","text":"expr expression (eventually) substituted. env environment potential replacement value might needed. object name (like formulas e.g. y ~ x) , use .name .symbol. data frame name (like iris) , use substitute.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"direct-use-of-substitute","dir":"Articles","previous_headings":"rtables","what":"Direct use of substitute","title":"Quick start: `substitute` for NSE","text":"substitute approach can used rtables pipelines. Lets prepare example reporting data LB domain. example based template LBT01; target report columns lab test result per study arm, values (AVAL) changes baseline (CHG), per analysis visit rows. data can prepared follows: rtables expression obtained : expression valid … : … easily readable …: … can arranged:","code":"library(teal.modules.clinical) library(dplyr) adlb <- tmc_ex_adlb adlb_f <- adlb %>% filter( PARAM == \"Alanine Aminotransferase Measurement\" & ARMCD %in% c(\"ARM A\", \"ARM B\") & AVISIT == \"WEEK 1 DAY 8\" ) rtables_expr <- substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ) %>% summarize_colvars() %>% build_table(df = df), env = list( df = substitute(adlb_f), arm = \"ARM\", visit = \"AVISIT\" ) ) eval(rtables_expr) ## A: Drug X B: Placebo ## Value Change Value Change ## —————————————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 rtables_expr ## basic_table() %>% split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", ## \"Change\")) %>% summarize_colvars() %>% build_table(df = adlb_f) library(teal) library(styler) #' Stylish code #' #' Deparse an expression and display the code following NEST conventions. #' #' @param expr (`call`)\\cr or possibly understood as so. #' styled_expr <- function(expr) { print( styler::style_text(text = deparse(expr)), colored = FALSE ) } #' #' @examples styled_expr(rtables_expr) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"substitute-in-a-function","dir":"Articles","previous_headings":"rtables","what":"substitute in a function","title":"Quick start: `substitute` for NSE","text":"Moving , substitute can actually wrapped function, way rtables pipelines programmatically obtained: results obtained … , fine tuning easier. instance, variable designating study arm visit can changed, expected feature teal module encoding panel.","code":"rtables_expr <- function(df, arm, visit) { substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ) %>% summarize_colvars() %>% build_table(df = df), env = list( df = substitute(df), arm = arm, visit = visit ) ) } result <- rtables_expr(df = adlb_f, arm = \"ARM\", visit = \"AVISIT\") styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f) eval(result) ## A: Drug X B: Placebo ## Value Change Value Change ## —————————————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 result <- rtables_expr(df = adlb_f, arm = \"ARMCD\", visit = \"AVISITN\") eval(result) ## Split var [AVISITN] was not character or factor. Converting to factor ## ARM A ARM B ## Value Change Value Change ## ————————————————————————————————————————————————————————————————————— ## 1 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARMCD\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISITN\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"chain-expressions-in-a-pipeline","dir":"Articles","previous_headings":"rtables","what":"Chain expressions in a pipeline","title":"Quick start: `substitute` for NSE","text":"also possible manipulate expressions, instance, expressions might chained pipeline. Expressions can arranged list, way, possible conditional editing expressions. context rtables, layers enclosing analyze call handle .stats option. lean expression include .stats option, default value changed. expected feature teal module rendering code Show R Code: First application standard statistics: statistics specifications:","code":"#' Expressions as a pipeline #' #' Accepts expressions to be chained using the `magrittr` pipeline-flavor. #' @param ... (`call`)\\cr or object which can be interpreted as so. #' (e.g. `name`) #' pipe_expr <- function(...) { exprs <- unlist(list(...)) exprs <- lapply( exprs, function(x) { x <- deparse(x) paste(x, collapse = \" \") } ) exprs <- unlist(exprs) exprs <- paste(exprs, collapse = \" %>% \") str2lang(exprs) } #' @examples result <- pipe_expr( expr1 = substitute(df), expr2 = substitute(head) ) result ## df %>% head rtables_expr <- function(df, arm, visit, .stats = NULL) { # The rtables layout is decomposed into a list of expressions. lyt <- list() # 1. First the columns and rows: lyt$structure <- substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ), env = list( arm = arm, visit = visit ) ) # 2. The analyze layer which depends on the use of .stats. lyt$analyze <- if (is.null(.stats)) { substitute( summarize_colvars() ) } else { substitute( summarize_colvars(.stats = .stats), list(.stats = .stats) ) } # 3. And finishing with rtables::build_table. lyt$build <- substitute( build_table(df = df), list(df = substitute(df)) ) # As previously demonstrated, expressions can be manipulated and # chained in a pipeline. pipe_expr(lyt) } result <- rtables_expr(df = adlb_f, arm = \"ARM\", visit = \"AVISIT\") styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f) eval(result) ## A: Drug X B: Placebo ## Value Change Value Change ## —————————————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 result <- rtables_expr( df = adlb_f, arm = \"ARM\", visit = \"AVISIT\", .stats = c(\"n\", \"mean_sd\") ) styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars(.stats = c(\"n\", \"mean_sd\")) %>% ## build_table(df = adlb_f) eval(result) ## A: Drug X B: Placebo ## Value Change Value Change ## ——————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"including-pre-processing","dir":"Articles","previous_headings":"rtables","what":"Including pre-processing","title":"Quick start: `substitute` for NSE","text":"Finally, also possible wrap several expressions single function. instance, teal module generally includes pre-processing section: now possible modify studied parameter (PARAMCD) addition study arm visit variables names. two expressions consistent: two expressions can executed return rtables:","code":"rtables_expr <- function(df, paramcd, arm, visit, .stats = NULL) { # y is a list which will collect two expressions: # 1. y$data with the preprocessing steps. # 2. y$rtables the table layout and build. y <- list() # 1. Preprocessing --- y$data <- substitute( df <- df %>% filter( PARAMCD == paramcd & ARMCD %in% c(\"ARM A\", \"ARM B\") & AVISIT == \"WEEK 1 DAY 8\" ), list( df = substitute(df), paramcd = paramcd ) ) # 2. rtables layout --- lyt <- list() lyt$structure <- substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ), env = list( arm = arm, visit = visit ) ) lyt$analyze <- if (is.null(.stats)) { substitute( summarize_colvars() ) } else { substitute( summarize_colvars(.stats = .stats), list(.stats = .stats) ) } lyt$build <- substitute( build_table(df = df), list(df = substitute(df)) ) y$rtables <- pipe_expr(lyt) # Finally returns y as a list with two expressions. y } adlb <- tmc_ex_adlb result <- rtables_expr( df = adlb, paramcd = \"CRP\", arm = \"ARM\", visit = \"AVISIT\", .stats = c(\"n\", \"mean_sd\") ) styled_expr(result$data) ## adlb <- adlb %>% filter(PARAMCD == \"CRP\" & ARMCD %in% c( ## \"ARM A\", ## \"ARM B\" ## ) & AVISIT == \"WEEK 1 DAY 8\") styled_expr(result$rtables) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars(.stats = c(\"n\", \"mean_sd\")) %>% ## build_table(df = adlb) result_exec <- mapply(eval, result) result_exec$rtables ## A: Drug X B: Placebo ## Value Change Value Change ## ———————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 1.0 (0.2) 0.0 (0.3) 1.0 (0.2) 0.0 (0.3)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/quickstart_substitute.html","id":"in-a-nutshell-1","dir":"Articles","previous_headings":"rtables","what":"In a nutshell","title":"Quick start: `substitute` for NSE","text":"point, possible : generate rtables pipelines. chain expressions pipeline (e.g. pipe_expr) decompose rtables pipeline add conditional layers (e.g. .stats). group expressions single list control pre-processing rtables pipeline.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/teal-modules-clinical.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting Started with {teal.modules.clinical}","text":"teal.modules.clinical package implementing number teal modules helpful exploring clinical trials data, specifically targeted towards data following ADaM standards. teal.modules.clinical modules can used data ADaM standard clinical data, features package tailored towards data type. concepts presented require knowledge core features teal, specifically launch teal application pass data . Therefore, highly recommended refer home page introductory vignette teal package.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/teal-modules-clinical.html","id":"main-features","dir":"Articles","previous_headings":"","what":"Main Features","title":"Getting Started with {teal.modules.clinical}","text":"package provides ready--use teal modules can embed teal application. modules generate highly customizable tables, plots, outputs often used exploratory data analysis, including: ANCOVA - tm_t_ancova() Cox regression - tm_t_coxreg() Kaplan-Meier plot - tm_g_km() Logistic regression - tm_t_logistic() Bar chart - tm_g_barchart_simple() Confidence interval plot - tm_g_ci() Binary outcome response table - tm_t_binary_outcome() Summary adverse events table - tm_t_events_summary() SMQ table - tm_t_smq() Time--event table - tm_t_tte() library also offers group patient profile modules targeted clinical statisticians physicians want review data per patient basis. modules present data patient’s adverse events, severity, current therapy, laboratory results . See full index package functions & modules .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/teal-modules-clinical.html","id":"a-simple-application","dir":"Articles","previous_headings":"","what":"A Simple Application","title":"Getting Started with {teal.modules.clinical}","text":"teal.modules.clinical module needs embedded inside shiny/teal application interact . simple application including bar chart module look like :","code":"library(teal.modules.clinical) library(nestcolor) ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae app <- init( data = cdisc_data( ADSL = ADSL, ADAE = ADAE, code = \" ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae \" ), modules = list( tm_g_barchart_simple( label = \"ADAE Analysis\", x = data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices( ADAE, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"SAFFL\", \"STRATA2\" ) ), selected = \"ACTARM\", multiple = FALSE ) ) ) ) ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/articles/teal-modules-clinical.html","id":"try-it-out-in-shinylive","dir":"Articles","previous_headings":"A Simple Application","what":"Try it out in Shinylive","title":"Getting Started with {teal.modules.clinical}","text":"Open Shinylive Consider consulting documentation examples module (e.g. ?tm_g_barchart_simple). many, can also find useful links TLG Catalog additional example apps can found. teal.modules.clinical exports modules needs support libraries run teal app flesh functionality. example , tm_g_barchart_simple() function teal.modules.clinical whereas init() teal function, data_extract_spec(), select_spec(), variable_choices() teal.transform functions, cdisc_data() teal.data function. Let’s break app pieces: lines load libraries used example. use example data provided teal.modules.clinical package: nestcolor optional package can loaded apply standardized NEST color palette module plots. need load teal teal.modules.clinical already depends . next step, use teal create shiny UI server functions can launch using shiny. data argument tells teal input data - ADaM datasets ADSL ADAE - modules argument indicates modules included application. , include one module: tm_g_barchart_simple(). Finally, use shiny launch application: teal.modules.clinical modules allow specification arguments using teal.transform::choices_selected(), tm_t_summary() module following example. Please refer API reference specific modules examples information customization options available.","code":"library(teal.modules.clinical) library(nestcolor) ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae app <- init( data = cdisc_data( ADSL = ADSL, ADAE = ADAE, code = \" ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae \" ), modules = list( tm_g_barchart_simple( label = \"ADAE Analysis\", x = data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices( ADAE, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"SAFFL\", \"STRATA2\" ) ), selected = \"ACTARM\", multiple = FALSE ) ) ) ) ) if (interactive()) shinyApp(app$ui, app$server) ADSL <- tmc_ex_adsl app <- init( data = cdisc_data(ADSL = ADSL, code = \"ADSL <- tmc_ex_adsl\"), modules = list( tm_t_summary( label = \"Demographic Table\", dataname = \"ADSL\", arm_var = choices_selected(choices = c(\"ARM\", \"ARMCD\"), selected = \"ARM\"), summarize_vars = choices_selected( choices = c(\"SEX\", \"RACE\", \"BMRKR2\", \"EOSDY\", \"DCSREAS\", \"AGE\"), selected = c(\"SEX\", \"RACE\") ) ) ) ) if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joe Zhu. Author, maintainer. Jana Stoilova. Author. Davide Garolini. Author. Emily de la Rua. Author. Abinaya Yogasekaram. Author. Mahmoud Hallal. Author. Dawid Kaledkowski. Author. Rosemary Li. Author. Heng Wang. Author. Pawel Rucki. Author. Nikolas Burkoff. Author. Konrad Pagacz. Author. Vaakesan Sundrelingam. Contributor. Francois Collin. Contributor. Imanol Zubizarreta. Contributor. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zhu J, Stoilova J, Garolini D, de la Rua E, Yogasekaram , Hallal M, Kaledkowski D, Li R, Wang H, Rucki P, Burkoff N, Pagacz K (2024). teal.modules.clinical: 'teal' Modules Standard Clinical Outputs. R package version 0.9.1.9042, https://github.com/insightsengineering/teal.modules.clinical/, https://insightsengineering.github.io/teal.modules.clinical/.","code":"@Manual{, title = {teal.modules.clinical: 'teal' Modules for Standard Clinical Outputs}, author = {Joe Zhu and Jana Stoilova and Davide Garolini and Emily {de la Rua} and Abinaya Yogasekaram and Mahmoud Hallal and Dawid Kaledkowski and Rosemary Li and Heng Wang and Pawel Rucki and Nikolas Burkoff and Konrad Pagacz}, year = {2024}, note = {R package version 0.9.1.9042, https://github.com/insightsengineering/teal.modules.clinical/}, url = {https://insightsengineering.github.io/teal.modules.clinical/}, }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/index.html","id":"tealmodulesclinical","dir":"","previous_headings":"","what":"teal Modules for Standard Clinical Outputs","title":"teal Modules for Standard Clinical Outputs","text":"package contains set standard teal modules used CDISC data order generate many standard outputs used clinical trials. modules include, limited : Forest plots (tm_g_forest_rsp()/tm_g_forest_tte()) Line plots (tm_g_lineplot()) Kaplan-Meier plots (tm_g_km()) … MMRM (tm_a_mmrm()) Logistic regression (tm_t_logistic()) Cox regression (tm_t_coxreg()) … Unique patients (tm_t_summary()) Exposure across patients (tm_t_exposure()) Change baseline parameters (tm_t_summary_by()) … Table basic information chosen patient (tm_t_pp_basic_info()) Plot patient vitals time (tm_g_pp_vitals()) General timeline individual patients (tm_g_pp_patient_timeline()) … modules package implemented using functions R package tern order produce output. Please see Teal Gallery TLG Catalog examples shiny apps created using modules package.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"teal Modules for Standard Clinical Outputs","text":"Alternatively, might want use development version.","code":"install.packages('teal.modules.clinical') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.modules.clinical\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"teal Modules for Standard Clinical Outputs","text":"understand use package, please refer Getting Started article, provides multiple examples code implementation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/index.html","id":"playground","dir":"","previous_headings":"","what":"Playground","title":"teal Modules for Standard Clinical Outputs","text":"can try package without installing Shinylive: stable development","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"teal Modules for Standard Clinical Outputs","text":"encounter bug feature request, please file issue. questions, discussions, staying date, please use teal channel pharmaverse slack workspace.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/index.html","id":"acknowledgment","dir":"","previous_headings":"","what":"Acknowledgment","title":"teal Modules for Standard Clinical Outputs","text":"package result joint efforts many developers stakeholders. like thank everyone contributed far!","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/add_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression List — add_expr","title":"Expression List — add_expr","text":"Add new expression list (expressions).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/add_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression List — add_expr","text":"","code":"add_expr(expr_ls, new_expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/add_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression List — add_expr","text":"expr_ls (list call) list new expression added. new_expr (call) new expression add.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/add_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression List — add_expr","text":"list call.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/add_expr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Expression List — add_expr","text":"Offers stricter control add new expressions existing list. list expressions can later used generate pipeline, instance pipe_expr.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/add_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression List — add_expr","text":"","code":"library(rtables) lyt <- list() lyt <- add_expr(lyt, substitute(basic_table())) lyt <- add_expr( lyt, substitute(split_cols_by(var = arm), env = list(armcd = \"ARMCD\")) ) lyt <- add_expr( lyt, substitute( test_proportion_diff( vars = \"rsp\", method = \"cmh\", variables = list(strata = \"strata\") ) ) ) lyt <- add_expr(lyt, quote(build_table(df = dta))) pipe_expr(lyt) #> basic_table() %>% split_cols_by(var = arm) %>% test_proportion_diff(vars = \"rsp\", #> method = \"cmh\", variables = list(strata = \"strata\")) %>% #> build_table(df = dta)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/arm_ref_comp_observer.html","id":null,"dir":"Reference","previous_headings":"","what":"Observer for Treatment reference variable — arm_ref_comp_observer","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"Updates reference comparison Treatments selected Treatment variable changes","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/arm_ref_comp_observer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"","code":"arm_ref_comp_observer( session, input, output, id_ref = \"Ref\", id_comp = \"Comp\", id_arm_var, data, arm_ref_comp, module, on_off = reactive(TRUE), input_id = \"buckets\", output_id = \"arms_buckets\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/arm_ref_comp_observer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"session (environment) shiny session input (character) shiny input output (character) shiny input id_ref (character) id reference Treatment input UI element id_comp (character) id comparison group input UI element id_arm_var (character) id Treatment variable input UI element data (reactive data.frame) dataset used validate Treatment reference inputs set id_ref input. arm_ref_comp (unknown) Treatment reference compare variables provided nested list Treatment variable corresponds list specifying default levels reference comparison treatments. module (character) name module called (used produce informative error messages) on_off (logical) reactive can used stop whole observer FALSE. input_id (character) unique id buckets referenced . output_id (character) name UI id output written .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/arm_ref_comp_observer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"Returns shinyvalidate::InputValidator checks least one reference comparison arm","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/as_num.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse text input to numeric vector — as_num","title":"Parse text input to numeric vector — as_num","text":"Generic parse text numeric vectors. initially designed robust interpretation text input teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/as_num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse text input to numeric vector — as_num","text":"","code":"as_num(str) # Default S3 method as_num(str) # S3 method for class 'character' as_num(str) # S3 method for class 'numeric' as_num(str) # S3 method for class 'factor' as_num(str) # S3 method for class 'logical' as_num(str)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/as_num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse text input to numeric vector — as_num","text":"str (vector) extract numeric .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/as_num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse text input to numeric vector — as_num","text":"vector numeric directly parsed numeric boolean. list numeric parsed character string, character string associated list item.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/as_num.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Parse text input to numeric vector — as_num","text":"function intended extract numeric character string, factor levels, boolean return vector numeric.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/as_num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parse text input to numeric vector — as_num","text":"","code":"dta <- list( character = c(\"text10,20.5letter30.!\", \"!-.40$$-50e5[\", NA), factor = factor(c(\"]+60e-6, 7.7%%8L\", \"%90sep.100\\\"1L\", NA_character_)), numeric = c(1, -5e+2, NA), logical = c(TRUE, FALSE, NA) ) lapply(dta, as_num) #> $character #> $character[[1]] #> [1] 10.0 20.5 30.0 #> #> $character[[2]] #> [1] -4e-01 -5e+06 #> #> $character[[3]] #> [1] NA #> #> #> $factor #> $factor[[1]] #> [1] 0.00006 7.70000 8.00000 #> #> $factor[[2]] #> [1] 90.0 0.1 1.0 #> #> $factor[[3]] #> [1] NA #> #> #> $numeric #> [1] 1 -500 NA #> #> $logical #> [1] 1 0 NA #>"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/bracket_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expressions in Brackets — bracket_expr","title":"Expressions in Brackets — bracket_expr","text":"Groups several expressions single bracketed expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/bracket_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expressions in Brackets — bracket_expr","text":"","code":"bracket_expr(exprs)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/bracket_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expressions in Brackets — bracket_expr","text":"exprs (list call) expressions concatenate single bracketed expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/bracket_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expressions in Brackets — bracket_expr","text":"{ object. See base::Paren() details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/bracket_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expressions in Brackets — bracket_expr","text":"","code":"adsl <- tmc_ex_adsl adrs <- tmc_ex_adrs expr1 <- substitute( expr = anl <- subset(df, PARAMCD == param), env = list(df = as.name(\"adrs\"), param = \"INVET\") ) expr2 <- substitute(expr = anl$rsp_lab <- d_onco_rsp_label(anl$AVALC)) expr3 <- substitute( expr = { anl$is_rsp <- anl$rsp_lab %in% c(\"Complete Response (CR)\", \"Partial Response (PR)\") } ) res <- bracket_expr(list(expr1, expr2, expr3)) eval(res) table(anl$rsp_lab, anl$is_rsp) #> #> FALSE TRUE #> Complete Response (CR) 0 60 #> Partial Response (PR) 0 45 #> Stable Disease (SD) 50 0 #> Progressive Disease (PD) 39 0 #> Not Evaluable (NE) 6 0"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/call_concatenate.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate expressions via a binary operator — call_concatenate","title":"Concatenate expressions via a binary operator — call_concatenate","text":"e.g. combine + ggplot without introducing parentheses due associativity","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/call_concatenate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate expressions via a binary operator — call_concatenate","text":"","code":"call_concatenate(args, bin_op = \"+\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/call_concatenate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate expressions via a binary operator — call_concatenate","text":"args arguments concatenate operator bin_op binary operator concatenate ","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/call_concatenate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate expressions via a binary operator — call_concatenate","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/call_concatenate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate expressions via a binary operator — call_concatenate","text":"","code":"library(ggplot2) # What we want to achieve call(\"+\", quote(f), quote(g)) #> f + g call(\"+\", quote(f), call(\"+\", quote(g), quote(h))) # parentheses not wanted #> f + (g + h) call(\"+\", call(\"+\", quote(f), quote(g)), quote(h)) # as expected without unnecessary parentheses #> f + g + h Reduce(function(existing, new) call(\"+\", existing, new), list(quote(f), quote(g), quote(h))) #> f + g + h # how we do it call_concatenate(list(quote(f), quote(g), quote(h))) #> f + g + h call_concatenate(list(quote(f))) #> f call_concatenate(list()) #> NULL call_concatenate( list(quote(ggplot(mtcars)), quote(geom_point(aes(wt, mpg)))) ) #> ggplot(mtcars) + geom_point(aes(wt, mpg)) eval( call_concatenate( list(quote(ggplot(mtcars)), quote(geom_point(aes(wt, mpg)))) ) )"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/check_arm_ref_comp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if the Treatment variable is reference or compare — check_arm_ref_comp","text":"","code":"check_arm_ref_comp(x, df_to_check, module)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/check_arm_ref_comp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if the Treatment variable is reference or compare — check_arm_ref_comp","text":"x (character) Name variable df_to_check (data.frame) table check module (character) teal module ref comp called ","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/check_arm_ref_comp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if the Treatment variable is reference or compare — check_arm_ref_comp","text":"TRUE FALSE whether variable ref comp","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/clean_description.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean up categorical variable description — clean_description","title":"Clean up categorical variable description — clean_description","text":"Cleaning categorical variable descriptions presenting.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/clean_description.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean up categorical variable description — clean_description","text":"","code":"clean_description(x)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/clean_description.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean up categorical variable description — clean_description","text":"x (character) vector categories descriptions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/clean_description.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean up categorical variable description — clean_description","text":"string","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/clean_description.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean up categorical variable description — clean_description","text":"","code":"clean_description(\"Level A (other text)\") #> [1] \"Level A\" clean_description(\"A long string that should be shortened\") #> [1] \"A long string tha...\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/color_lab_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Mapping function for Laboratory Table — color_lab_values","title":"Mapping function for Laboratory Table — color_lab_values","text":"Map value level characters values proper html tags, colors icons.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/color_lab_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mapping function for Laboratory Table — color_lab_values","text":"","code":"color_lab_values( x, classes = c(\"HIGH\", \"NORMAL\", \"LOW\"), colors = list(HIGH = \"red\", NORMAL = \"grey\", LOW = \"blue\"), default_color = \"black\", icons = list(HIGH = \"glyphicon glyphicon-arrow-up\", LOW = \"glyphicon glyphicon-arrow-down\") )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/color_lab_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mapping function for Laboratory Table — color_lab_values","text":"x (character) vector elements format (value level). classes (character) classes vector. colors (list) color per class. default_color (character) default color. icons (list) certain icons per level.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/color_lab_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mapping function for Laboratory Table — color_lab_values","text":"character vector element formatted HTML tag corresponding value x.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/color_lab_values.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mapping function for Laboratory Table — color_lab_values","text":"","code":"color_lab_values(c(\"LOW\", \"LOW\", \"HIGH\", \"NORMAL\", \"HIGH\")) #> LOW #> \"LOW<\/i><\/span>\" #> LOW #> \"LOW<\/i><\/span>\" #> HIGH #> \"HIGH<\/i><\/span>\" #> NORMAL #> \"NORMAL<\/i><\/span>\" #> HIGH #> \"HIGH<\/i><\/span>\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/column_annotation_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Get full label, useful for annotating plots — column_annotation_label","title":"Get full label, useful for annotating plots — column_annotation_label","text":"Get full label, useful annotating plots","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/column_annotation_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get full label, useful for annotating plots — column_annotation_label","text":"","code":"column_annotation_label(dataset, column, omit_raw_name = FALSE)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/column_annotation_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get full label, useful for annotating plots — column_annotation_label","text":"dataset (data.frame) dataset column (character) column get label omit_raw_name (logical) omits raw name square brackets label found","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/column_annotation_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get full label, useful for annotating plots — column_annotation_label","text":"\"Label [Column name]\" label exists, otherwise \"Column name\".","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/column_annotation_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get full label, useful for annotating plots — column_annotation_label","text":"","code":"data <- mtcars column_annotation_label(data, \"cyl\") #> [1] \"cyl\" attr(data[[\"cyl\"]], \"label\") <- \"Cylinder\" column_annotation_label(data, \"cyl\") #> [1] \"Cylinder [cyl]\" column_annotation_label(data, \"cyl\", omit_raw_name = TRUE) #> [1] \"Cylinder\" column_annotation_label(tmc_ex_adsl, \"ACTARM\") #> [1] \"Description of Actual Arm [ACTARM]\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/control_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"Control Function for Time-To-Event teal Module — control_tte","title":"Control Function for Time-To-Event teal Module — control_tte","text":"Controls arguments Cox regression survival analysis results.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/control_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Control Function for Time-To-Event teal Module — control_tte","text":"","code":"control_tte( surv_time = list(conf_level = 0.95, conf_type = \"plain\", quantiles = c(0.25, 0.75)), coxph = list(pval_method = \"log-rank\", ties = \"efron\", conf_level = 0.95), surv_timepoint = control_surv_timepoint(conf_level = 0.95, conf_type = c(\"plain\", \"none\", \"log\", \"log-log\")) )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/control_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Control Function for Time-To-Event teal Module — control_tte","text":"surv_time (list) control parameters survfit model. See tern::control_surv_time() details. coxph (list) control parameters Cox-PH model. See tern::control_coxph() details. surv_timepoint (list) control parameters survfit model time point. See tern::control_surv_timepoint() details.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"Convert choices_selected data_extract_spec filter_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"","code":"cs_to_des_filter( cs, dataname, multiple = FALSE, include_vars = FALSE, label = \"Filter by\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. dataname (character) name data multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). include_vars (flag) whether include filter variables fixed selection result. can useful preserving reuse rtables code e.g. label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_filter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"(teal.transform::data_extract_spec())","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_select.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"Convert choices_selected data_extract_spec select_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_select.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"","code":"cs_to_des_select( cs, dataname, multiple = FALSE, ordered = FALSE, label = \"Select\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_select.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. dataname (character) name data multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). ordered (logical(1)) Flags whether selection order tracked. label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_des_select.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"(teal.transform::data_extract_spec())","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_filter_spec.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to filter_spec — cs_to_filter_spec","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"Convert choices_selected filter_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_filter_spec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"","code":"cs_to_filter_spec(cs, multiple = FALSE, label = \"Filter by\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_filter_spec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_filter_spec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"(teal.transform::filter_spec())","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_select_spec.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to select_spec — cs_to_select_spec","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"Convert choices_selected select_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_select_spec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"","code":"cs_to_select_spec(cs, multiple = FALSE, ordered = FALSE, label = \"Select\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_select_spec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). ordered (logical(1)) Flags whether selection order tracked. label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/cs_to_select_spec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"(select_spec)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/default_total_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Default string for total column label — default_total_label","title":"Default string for total column label — default_total_label","text":"default string used label \"total\" column. value used default value total_label argument throughout teal.modules.clinical package. specified module user via total_label argument, R environment options via set_default_total_label(), \"Patients\" used.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/default_total_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default string for total column label — default_total_label","text":"","code":"default_total_label() set_default_total_label(total_label)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/default_total_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default string for total column label — default_total_label","text":"total_label (string) Single string value set R environment options default label use \"total\" column. Use getOption(\"tmc_default_total_label\") check current value set R environment (defaults \"Patients\" set).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/default_total_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default string for total column label — default_total_label","text":"default_total_label returns current value R environment option set \"tmc_default_total_label\", \"Patients\" otherwise. set_default_total_label return value.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/default_total_label.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Default string for total column label — default_total_label","text":"default_total_label(): Getter default total column label. set_default_total_label(): Setter default total column label. Sets option \"tmc_default_total_label\" within R environment.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/default_total_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Default string for total column label — default_total_label","text":"","code":"# Default settings default_total_label() #> [1] \"All Patients\" getOption(\"tmc_default_total_label\") #> NULL # Set custom value set_default_total_label(\"All Patients\") # Settings after value has been set default_total_label() #> [1] \"All Patients\" getOption(\"tmc_default_total_label\") #> [1] \"All Patients\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/ex_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated CDISC Data for Examples — ex_data","title":"Simulated CDISC Data for Examples — ex_data","text":"Simulated CDISC Data Examples","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/ex_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulated CDISC Data for Examples — ex_data","text":"","code":"tmc_ex_adsl tmc_ex_adae tmc_ex_adaette tmc_ex_adcm tmc_ex_adeg tmc_ex_adex tmc_ex_adlb tmc_ex_admh tmc_ex_adqs tmc_ex_adrs tmc_ex_adtte tmc_ex_advs"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/ex_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated CDISC Data for Examples — ex_data","text":"rds (data.frame) object class tbl_df (inherits tbl, data.frame) 200 rows 26 columns. object class tbl_df (inherits tbl, data.frame) 541 rows 51 columns. object class tbl_df (inherits tbl, data.frame) 1800 rows 35 columns. object class tbl_df (inherits tbl, data.frame) 512 rows 45 columns. object class tbl_df (inherits tbl, data.frame) 5200 rows 48 columns. object class tbl_df (inherits tbl, data.frame) 200 rows 37 columns. object class tbl_df (inherits tbl, data.frame) 3000 rows 58 columns. object class tbl_df (inherits tbl, data.frame) 1077 rows 33 columns. object class tbl_df (inherits tbl, data.frame) 7000 rows 36 columns. object class tbl_df (inherits tbl, data.frame) 1600 rows 34 columns. object class tbl_df (inherits tbl, data.frame) 1000 rows 34 columns. object class tbl_df (inherits tbl, data.frame) 8400 rows 34 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/ex_data.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Simulated CDISC Data for Examples — ex_data","text":"tmc_ex_adsl: ADSL data tmc_ex_adae: ADAE data tmc_ex_adaette: ADAETTE data tmc_ex_adcm: ADCM data tmc_ex_adeg: ADEG data tmc_ex_adex: ADEX data tmc_ex_adlb: ADLB data tmc_ex_admh: ADMH data tmc_ex_adqs: ADQS data tmc_ex_adrs: ADRS data tmc_ex_adtte: ADTTE data tmc_ex_advs: ADVS data","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/extract_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts html id for data_extract_ui — extract_input","title":"Extracts html id for data_extract_ui — extract_input","text":"data_extract_ui located extended html id. use ns(\"original id\") reference, extended specific suffixes.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/extract_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts html id for data_extract_ui — extract_input","text":"","code":"extract_input(varname, dataname, filter = FALSE)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/extract_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts html id for data_extract_ui — extract_input","text":"varname (character) original html id. retrieved ns(\"original id\") UI function session$ns(\"original id\")/\"original id\" server function. dataname (character)dataname data_extract input. might retrieved like data_extract_spec(...)[[1]]$dataname. filter (logical) optional, connected extract_data_spec objects passed filter argument","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/extract_input.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts html id for data_extract_ui — extract_input","text":"string","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/extract_input.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts html id for data_extract_ui — extract_input","text":"","code":"extract_input(\"ARM\", \"ADSL\") #> [1] \"ARM-dataset_ADSL_singleextract-select\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/facet_grid_formula.html","id":null,"dir":"Reference","previous_headings":"","what":"Facetting formula x_facet ~ y_facet — facet_grid_formula","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"Replaces x_facet y_facet . empty character","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/facet_grid_formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"","code":"facet_grid_formula(x_facet, y_facet)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/facet_grid_formula.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"x_facet (character(1)) name x facet, empty, facet along x. y_facet (character(1)) name y facet, empty, facet along y.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/facet_grid_formula.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"facet grid formula formula(x_facet ~ y_facet)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_g_forest_obj_var_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","title":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","text":"Utility function extracting paramcd forest plots","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_g_forest_obj_var_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","text":"","code":"get_g_forest_obj_var_name(paramcd, input, filter_idx = 1)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_g_forest_obj_var_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","text":"paramcd teal.transform::data_extract_spec() variable value designating studied parameter. input shiny app input filter_idx filter section index (default 1)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_paramcd_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the associated parameter value for paramcd — get_paramcd_label","title":"Extract the associated parameter value for paramcd — get_paramcd_label","text":"Utility function extracting parameter value associated paramcd value label. parameter value paramcd label, paramcd value returned. used generating title.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_paramcd_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the associated parameter value for paramcd — get_paramcd_label","text":"","code":"get_paramcd_label(anl, paramcd)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_paramcd_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the associated parameter value for paramcd — get_paramcd_label","text":"anl Analysis dataset paramcd teal.transform::data_extract_spec() variable value designating studied parameter.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_var_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variable labels — get_var_labels","text":"","code":"get_var_labels(datasets, dataname, vars)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_var_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get variable labels — get_var_labels","text":"datasets (teal::FilteredData) Data built teal dataname (character) name dataset vars (character) Column names data","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/get_var_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variable labels — get_var_labels","text":"character variable labels.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/h_concat_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression Deparsing — h_concat_expr","title":"Expression Deparsing — h_concat_expr","text":"Deparse expression string.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/h_concat_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression Deparsing — h_concat_expr","text":"","code":"h_concat_expr(expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/h_concat_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression Deparsing — h_concat_expr","text":"expr (call) object can used .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/h_concat_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression Deparsing — h_concat_expr","text":"string.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/h_concat_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression Deparsing — h_concat_expr","text":"","code":"expr <- quote({ library(rtables) basic_table() %>% split_cols_by(var = \"ARMCD\") %>% test_proportion_diff( vars = \"rsp\", method = \"cmh\", variables = list(strata = \"strata\") ) %>% build_table(df = dta) }) h_concat_expr(expr) #> [1] \"{\\n library(rtables)\\n basic_table() %>% split_cols_by(var = \\\"ARMCD\\\") %>% test_proportion_diff(vars = \\\"rsp\\\", \\n method = \\\"cmh\\\", variables = list(strata = \\\"strata\\\")) %>% \\n build_table(df = dta)\\n}\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/is.cs_or_des.html","id":null,"dir":"Reference","previous_headings":"","what":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"Whether object class teal.transform::choices_selected()","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/is.cs_or_des.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"","code":"is.cs_or_des(x)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/is.cs_or_des.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"x object checked","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/is.cs_or_des.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"(logical)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/make_barchart_simple_call.html","id":null,"dir":"Reference","previous_headings":"","what":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"ggplot2 call generate simple bar chart","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/make_barchart_simple_call.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"","code":"make_barchart_simple_call( y_name, x_name = NULL, fill_name = NULL, x_facet_name = NULL, y_facet_name = NULL, label_bars = TRUE, barlayout = c(\"side_by_side\", \"stacked\"), flip_axis = FALSE, rotate_bar_labels = FALSE, rotate_x_label = FALSE, rotate_y_label = FALSE, expand_y_range = 0, facet_scales = \"free_x\", ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/make_barchart_simple_call.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"y_name (character NULL) name y-axis variable. x_name (character NULL) name x-axis variable. Defaults NULL dependent extract input can empty. fill_name (character NULL) name variable determine bar fill color. x_facet_name (character NULL) name variable use horizontal plot faceting. y_facet_name (character NULL) name variable use vertical plot faceting. label_bars (logical NULL) whether bars labeled. TRUE, label bar numbers also drawn text. barlayout (character NULL) type bar layout. Options \"stacked\" (default) \"side_by_side\". flip_axis (character NULL) whether flip plot axis. rotate_bar_labels (logical NULL) whether bar labels rotated 45 degrees. rotate_x_label (logical NULL) whether x-axis labels rotated 45 degrees. rotate_y_label (logical NULL) whether y-axis labels rotated 45 degrees. expand_y_range (numeric NULL) fraction y-axis range expand . facet_scales (character) value passed scales argument ggplot2::facet_grid(). Options fixed, free_x, free_y, free. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/make_barchart_simple_call.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"call produce ggplot object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/module_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard Module Arguments — module_arguments","title":"Standard Module Arguments — module_arguments","text":"documentation function lists arguments teal modules used repeatedly express analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/module_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standard Module Arguments — module_arguments","text":"arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. atirel (teal.transform::choices_selected()) object available choices preselected option ATIREL variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. avisit (teal.transform::choices_selected()) value analysis visit AVISIT interest. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. by_vars (teal.transform::choices_selected()) object available choices preselected option variable names used split summary rows. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname. cmindc (teal.transform::choices_selected()) object available choices preselected option CMINDC variable dataname. cmstdy (teal.transform::choices_selected()) object available choices preselected option CMSTDY variable dataname. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. dataname (character) analysis data used teal module. default_responses (list character) defines default codes response variable module per value paramcd. passed vector transmitted paramcd values. passed list must named contain arrays, name corresponding single value paramcd. array may contain default response values named arrays rsp default selected response values levels default level choices. fixed_symbol_size (logical) (TRUE), symbol size used plotting estimate. Otherwise, symbol size proportional sample size subgroup. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. hlt (teal.transform::choices_selected()) name variable high level term events. id_var (teal.transform::choices_selected()) object specifying variable name subject id. interact_var (character) name variable interactions arm. interaction needed, default option NULL. interact_y (character) selected item interact_var column used select specific ANCOVA results interact_var discrete. interaction needed, default option FALSE. label (character) menu item label module teal app. llt (teal.transform::choices_selected()) name variable low level term events. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. pre_output (shiny.tag) optional, text placed output put output context. example title. strata_var (teal.transform::choices_selected()) names variables stratified analysis. summarize_vars (teal.transform::choices_selected()) names variables summarized. subgroup_var (teal.transform::choices_selected()) object available choices preselected option variable names can used default subgroups. time_points (teal.transform::choices_selected()) object available choices preselected option time points can used tern::surv_timepoint(). time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. useNA (character) whether missing data (NA) displayed level. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. worst_flag_indicator (teal.transform::choices_selected()) value indicating worst grade. worst_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used worst flag variable. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/module_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standard Module Arguments — module_arguments","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/module_arguments.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standard Module Arguments — module_arguments","text":"Although function just returns NULL two uses, teal module users provides documentation arguments commonly consistently used framework. developer adds single reference point import roxygen argument description : @inheritParams module_arguments Parameters identical descriptions & input types Standard Template Arguments section excluded reduce duplication module function inherits parameters corresponding template function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/normalize_decorators.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert flat list of teal_transform_module to named lists — normalize_decorators","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"Convert flat list teal_transform_module named lists","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/normalize_decorators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"","code":"normalize_decorators(decorators)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/normalize_decorators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"decorators (list teal_transformodules) normalize.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/normalize_decorators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"named list lists teal_transform_module objects.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/pipe_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expressions as a Pipeline — pipe_expr","title":"Expressions as a Pipeline — pipe_expr","text":"Concatenate expressions single pipeline-flavor expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/pipe_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expressions as a Pipeline — pipe_expr","text":"","code":"pipe_expr(exprs, pipe_str = \"%>%\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/pipe_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expressions as a Pipeline — pipe_expr","text":"exprs (list call) expressions concatenate pipeline (%>%). pipe_str (character) character separates expressions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/pipe_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expressions as a Pipeline — pipe_expr","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/pipe_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expressions as a Pipeline — pipe_expr","text":"","code":"pipe_expr( list( expr1 = substitute(df), expr2 = substitute(head) ) ) #> df %>% head"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression: Arm Preparation — prepare_arm","title":"Expression: Arm Preparation — prepare_arm","text":"function generate standard expression pre-processing dataset teal module applications. especially interest preprocessing steps needs applied similarly several datasets (e.g. ADSL ADRS).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression: Arm Preparation — prepare_arm","text":"","code":"prepare_arm( dataname, arm_var, ref_arm, comp_arm, compare_arm = !is.null(ref_arm), ref_arm_val = paste(ref_arm, collapse = \"/\"), drop = TRUE )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression: Arm Preparation — prepare_arm","text":"dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. ref_arm_val (character) replacement name reference level. drop (logical) drop unused variable levels.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression: Arm Preparation — prepare_arm","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Expression: Arm Preparation — prepare_arm","text":"teal.modules.clinical, user interface includes manipulation study arms. Classically: arm variable (e.g. ARM, ACTARM), reference arm (0 ), comparison arm (1 ) possibility combine comparison arms. Note arms compared , produced expression reduced optionally dropping non-represented levels arm. comparing arms, pre-processing includes three steps: Filtering dataset retain arms interest (reference comparison). Optional, one arm designated reference combined single level. reference explicitly reassigned non-represented levels arm dropped.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression: Arm Preparation — prepare_arm","text":"","code":"prepare_arm( dataname = \"adrs\", arm_var = \"ARMCD\", ref_arm = \"ARM A\", comp_arm = c(\"ARM B\", \"ARM C\") ) #> adrs %>% dplyr::filter(ARMCD %in% c(\"ARM A\", \"ARM B\", \"ARM C\")) %>% #> dplyr::mutate(ARMCD = stats::relevel(ARMCD, ref = \"ARM A\")) %>% #> dplyr::mutate(ARMCD = droplevels(ARMCD)) prepare_arm( dataname = \"adsl\", arm_var = \"ARMCD\", ref_arm = c(\"ARM B\", \"ARM C\"), comp_arm = \"ARM A\" ) #> adsl %>% dplyr::filter(ARMCD %in% c(\"ARM B\", \"ARM C\", \"ARM A\")) %>% #> dplyr::mutate(ARMCD = combine_levels(ARMCD, levels = c(\"ARM B\", #> \"ARM C\"), new_level = \"ARM B/ARM C\")) %>% dplyr::mutate(ARMCD = stats::relevel(ARMCD, #> ref = \"ARM B/ARM C\")) %>% dplyr::mutate(ARMCD = droplevels(ARMCD))"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression: Prepare Arm Levels — prepare_arm_levels","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"function generates standard expression pre-processing dataset arm levels used apply steps safety teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"","code":"prepare_arm_levels(dataname, parentname, arm_var, drop_arm_levels = TRUE)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm_levels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"{ object. See base::Paren() details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/prepare_arm_levels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"","code":"prepare_arm_levels( dataname = \"adae\", parentname = \"adsl\", arm_var = \"ARMCD\", drop_arm_levels = TRUE ) #> { #> adae <- adae %>% dplyr::mutate(ARMCD = droplevels(ARMCD)) #> arm_levels <- levels(adae[[\"ARMCD\"]]) #> adsl <- adsl %>% dplyr::filter(ARMCD %in% arm_levels) #> adsl <- adsl %>% dplyr::mutate(ARMCD = droplevels(ARMCD)) #> } prepare_arm_levels( dataname = \"adae\", parentname = \"adsl\", arm_var = \"ARMCD\", drop_arm_levels = FALSE ) #> { #> adsl <- adsl %>% dplyr::mutate(ARMCD = droplevels(ARMCD)) #> arm_levels <- levels(adsl[[\"ARMCD\"]]) #> adae <- adae %>% dplyr::mutate(ARMCD = factor(ARMCD, levels = arm_levels)) #> }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/select_decorators.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset decorators based on the scope — select_decorators","title":"Subset decorators based on the scope — select_decorators","text":"default protected decorator name always included output, exists","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/select_decorators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset decorators based on the scope — select_decorators","text":"","code":"select_decorators(decorators, scope)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/select_decorators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset decorators based on the scope — select_decorators","text":"decorators (named list) list decorators subset. scope (character) character vector decorator names include.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/select_decorators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset decorators based on the scope — select_decorators","text":"flat list decorators include. can empty list none scope exists decorators argument.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_choices.html","id":null,"dir":"Reference","previous_headings":"","what":"Split choices_selected objects with interactions into their component variables — split_choices","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"Split choices_selected objects interactions component variables","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_choices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"","code":"split_choices(x)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_choices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"x (choices_selected) object interaction terms","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_choices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"teal.transform::choices_selected() object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_choices.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"uses regex \\\\*|: perform split.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_choices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"","code":"split_choices(choices_selected(choices = c(\"x:y\", \"a*b\"), selected = all_choices())) #> $choices #> [1] \"x\" \"y\" \"a\" \"b\" #> #> $selected #> [1] \"x\" \"y\" \"a\" \"b\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_col_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Split-Column Expression — split_col_expr","title":"Split-Column Expression — split_col_expr","text":"Renders expression column split rtables depending : expected arm comparison expected arm combination","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_col_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split-Column Expression — split_col_expr","text":"","code":"split_col_expr(compare, combine, ref, arm_var)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_col_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split-Column Expression — split_col_expr","text":"compare (logical) TRUE reference level included. combine (logical) TRUE group combination included. ref (character) reference level (used combine = TRUE). arm_var (character) arm grouping variable name.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_col_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split-Column Expression — split_col_expr","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_col_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split-Column Expression — split_col_expr","text":"","code":"split_col_expr( compare = TRUE, combine = FALSE, ref = \"ARM A\", arm_var = \"ARMCD\" ) #> rtables::split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_interactions.html","id":null,"dir":"Reference","previous_headings":"","what":"Split interaction terms into their component variables — split_interactions","title":"Split interaction terms into their component variables — split_interactions","text":"Split interaction terms component variables","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_interactions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split interaction terms into their component variables — split_interactions","text":"","code":"split_interactions(x, by = \"\\\\*|:\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_interactions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split interaction terms into their component variables — split_interactions","text":"x (character) string representing interaction usually form x:y x*y. (character) regex split interaction term .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_interactions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split interaction terms into their component variables — split_interactions","text":"vector strings element component variable extracted interaction term x.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/split_interactions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split interaction terms into their component variables — split_interactions","text":"","code":"split_interactions(\"x:y\") #> [1] \"x\" \"y\" split_interactions(\"x*y\") #> [1] \"x\" \"y\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/srv_decorate_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"Wrappers around srv_transform_teal_data allows decorate data","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/srv_decorate_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"","code":"srv_decorate_teal_data(id, data, decorators, expr, expr_is_reactive = FALSE) ui_decorate_teal_data(id, decorators, ...)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/srv_decorate_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"id (character(1)) Module id data (reactive teal_data) expr (expression reactive) evaluate output decoration. expression must inline code. See within() Default NULL evaluate appending code. expr_is_reactive (logical(1)) whether expr reactive expression skips defusing argument.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/srv_decorate_teal_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"srv_decorate_teal_data wrapper around srv_transform_teal_data allows decorate data additional expressions. original teal_data object error state, show error first. ui_decorate_teal_data wrapper around ui_transform_teal_data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Substitute Names in a Quoted Expression — substitute_names","title":"Substitute Names in a Quoted Expression — substitute_names","text":"function substitutes names left- right-hand sides quoted expression. addition can also standard substitutions right-hand side.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Substitute Names in a Quoted Expression — substitute_names","text":"","code":"substitute_names(expr, names, others = list()) h_subst_lhs_names(qexpr, names) substitute_lhs_names(qexpr, names) substitute_rhs(qexpr, env)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Substitute Names in a Quoted Expression — substitute_names","text":"expr (language) expression. names (named list name) requested name substitutions. others (named list) requested substitutions happen right-hand side. qexpr (language) quoted expression. env (environment list) requested variable substitutions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Substitute Names in a Quoted Expression — substitute_names","text":"modified expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_names.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Substitute Names in a Quoted Expression — substitute_names","text":"h_subst_lhs_names(): Helper function just substitute top-level names left-hand side quoted expression. substitute_lhs_names(): recursively substitutes names left-hand sides quoted expression. substitute_rhs(): substitutes right-hand side quoted expression. Note just synonym substitute_q().","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_q.html","id":null,"dir":"Reference","previous_headings":"","what":"Substitute in Quoted Expressions — substitute_q","title":"Substitute in Quoted Expressions — substitute_q","text":"version substitute needed substitute() evaluate first argument, often useful able modify quoted expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_q.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Substitute in Quoted Expressions — substitute_q","text":"","code":"substitute_q(qexpr, env)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_q.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Substitute in Quoted Expressions — substitute_q","text":"qexpr (language) quoted expression. env (environment list) requested variable substitutions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_q.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Substitute in Quoted Expressions — substitute_q","text":"modified expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/substitute_q.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Substitute in Quoted Expressions — substitute_q","text":"simplified package pryr avoid another dependency.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/teal.modules.clinical-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Modules for Standard Clinical Outputs — teal.modules.clinical-package","title":"teal Modules for Standard Clinical Outputs — teal.modules.clinical-package","text":"Provides teal modules standard clinical trials outputs. teal modules add encoding panel interactively change encodings within teal.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/teal.modules.clinical-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal Modules for Standard Clinical Outputs — teal.modules.clinical-package","text":"Maintainer: Joe Zhu joe.zhu@roche.com Authors: Jana Stoilova jana.stoilova@roche.com Davide Garolini davide.garolini@roche.com Emily de la Rua emily.de_la_rua@contractors.roche.com Abinaya Yogasekaram abinaya.yogasekaram@contractors.roche.com Mahmoud Hallal mahmoud.hallal@roche.com Dawid Kaledkowski dawid.kaledkowski@roche.com Rosemary Li li.yaqiong@gene.com Heng Wang wang.heng@gene.com Pawel Rucki pawel.rucki@roche.com Nikolas Burkoff Konrad Pagacz contributors: Vaakesan Sundrelingam [contributor] Francois Collin [contributor] Imanol Zubizarreta [contributor] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_a_gee.html","id":null,"dir":"Reference","previous_headings":"","what":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"Creates valid expression generate analysis table using Generalized Estimating Equations (GEE).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_a_gee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"","code":"template_a_gee( output_table, data_model_fit = \"ANL\", dataname_lsmeans = \"ANL_ADSL\", input_arm_var = \"ARM\", ref_group = \"A: Drug X\", aval_var, id_var, arm_var, visit_var, split_covariates, cor_struct, conf_level = 0.95, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_a_gee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"output_table (character) type output table (\"t_gee_cov\", \"t_gee_coef\", \"t_gee_lsmeans\"). data_model_fit (character) dataset used fit model tern.gee::fit_gee(). dataname_lsmeans (character) dataset used alt_counts_df argument rtables::build_table(). aval_var (character) name analysis value variable. id_var (character) variable name subject id. arm_var (character) variable names can used arm_var. visit_var (character) variable names can used visit variable. Must factor dataname. split_covariates (character) vector names variables use covariates tern.gee::vars_gee(). cor_struct (character) assumed correlation structure tern.gee::fit_gee. conf_level (numeric) value confidence level within range (0, 1). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_a_gee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Abnormality Summary Table — template_abnormality","title":"Template: Abnormality Summary Table — template_abnormality","text":"Creates valid expression generate table summarize abnormality.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Abnormality Summary Table — template_abnormality","text":"","code":"template_abnormality( parentname, dataname, arm_var, id_var = \"USUBJID\", by_vars, abnormal = list(low = c(\"LOW\", \"LOW LOW\"), high = c(\"HIGH\", \"HIGH HIGH\")), grade = \"ANRIND\", baseline_var = \"BNRIND\", treatment_flag_var = \"ONTRTFL\", treatment_flag = \"Y\", add_total = FALSE, total_label = default_total_label(), exclude_base_abn = FALSE, drop_arm_levels = TRUE, na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args(), tbl_title )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Abnormality Summary Table — template_abnormality","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. by_vars (character) variable names used split summary rows. abnormal (named list) indicating abnormality direction grades. grade (character) name variable used specify abnormality grade. Variable must factor. baseline_var (character) name variable specifying baseline abnormality grade. treatment_flag_var (character) name treatment flag variable. treatment_flag (character) name value indicating treatment records treatment_flag_var. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). exclude_base_abn (logical) whether exclude patients abnormal values baseline. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. na_level (character) NA level input dataset, defaults \"\". basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). tbl_title (character) Title label variables bars","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Abnormality Summary Table — template_abnormality","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality_by_worst_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"Creates valid expression generate table summarize abnormality grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality_by_worst_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"","code":"template_abnormality_by_worst_grade( parentname, dataname, arm_var, id_var = \"USUBJID\", paramcd = \"PARAMCD\", atoxgr_var = \"ATOXGR\", worst_high_flag_var = \"WGRHIFL\", worst_low_flag_var = \"WGRLOFL\", worst_flag_indicator = \"Y\", add_total = FALSE, total_label = default_total_label(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality_by_worst_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. paramcd (character) name parameter code variable. atoxgr_var (character) name variable indicating Analysis Toxicity Grade. worst_high_flag_var (character) name variable indicating Worst High Grade flag worst_low_flag_var (character) name variable indicating Worst Low Grade flag worst_flag_indicator (character) flag value indicating worst grade. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_abnormality_by_worst_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_adverse_events.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"Creates valid expression generate adverse events table ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_adverse_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"","code":"template_adverse_events( dataname = \"ANL\", aeterm = \"AETERM\", tox_grade = \"AETOXGR\", causality = \"AEREL\", outcome = \"AEOUT\", action = \"AEACN\", time = \"ASTDY\", decod = NULL, patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_adverse_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"dataname (character) analysis data used teal module. aeterm (character) name reported term adverse event variable. tox_grade (character) name standard toxicity grade variable. causality (character) name causality variable. outcome (character) name outcome adverse event variable. action (character) name action taken study treatment variable. time (character) name study day start adverse event variable. decod (character) name dictionary derived term variable. patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_adverse_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_ancova.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: ANCOVA Summary — template_ancova","title":"Template: ANCOVA Summary — template_ancova","text":"Creates valid expression generate analysis variance summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_ancova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: ANCOVA Summary — template_ancova","text":"","code":"template_ancova( dataname = \"ANL\", parentname = \"ADSL\", arm_var, ref_arm = NULL, comp_arm = NULL, combine_comp_arms = FALSE, aval_var, label_aval = NULL, cov_var, include_interact = FALSE, interact_var = NULL, interact_y = FALSE, paramcd_levels = \"\", paramcd_var = \"PARAMCD\", label_paramcd = NULL, visit_levels = \"\", visit_var = \"AVISIT\", conf_level = 0.95, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_ancova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: ANCOVA Summary — template_ancova","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. label_aval (character) label value variable used title rendering. cov_var (character) names covariates variables. include_interact (logical) whether interaction term included model. interact_var (character) name variable interactions arm. interaction needed, default option NULL. interact_y (character) selected item interact_var column used select specific ANCOVA results. interaction needed, default option FALSE. paramcd_levels (character) variable levels studied parameter. paramcd_var (character) variable name studied parameter. label_paramcd (character) variable label used title rendering. visit_levels (character) variable levels studied visits. visit_var (character) variable names can used visit variable. Must factor dataname. conf_level (numeric) value confidence level within range (0, 1). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_ancova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: ANCOVA Summary — template_ancova","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard Template Arguments — template_arguments","title":"Standard Template Arguments — template_arguments","text":"documentation function lists arguments teal module templates used repeatedly express analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standard Template Arguments — template_arguments","text":"add_total (logical) whether include column total number patients. anl_name (character) analysis data used teal module. arm_var (character) variable names can used arm_var. atirel (character) name time relation medication variable. aval Please use aval_var argument instead. avalu Please use avalu_var argument instead. avalu_var (character) name analysis value unit variable. aval_var (character) name analysis value variable. baseline_var (character) name variable baseline values analysis variable. base_var Please use baseline_var argument instead. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). by_vars (character) variable names used split summary rows. cmdecod (character) name standardized medication name variable. cmindc (character) name indication variable. cmstdy (character) name study relative day start medication variable. cnsr_var (character) name censoring variable. combine_comp_arms (logical) triggers combination comparison arms. compare_arm (logical) triggers comparison study arms. comp_arm (character) level comparison arm case arm comparison. conf_level (numeric) value confidence level within range (0, 1). control (list) list settings analysis. cov_var (character) names covariates variables. dataname (character) analysis data used teal module. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). hlt (character) name variable high level term events. id_var (character) variable name subject id. include_interact (logical) whether interaction term included model. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. llt (character) name variable low level term events. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). na.rm (logical) whether NA values removed prior analysis. numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. paramcd (character) name parameter code variable. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_id (character) patient ID. prune_diff (number) threshold use trimming table using criteria difference rates two columns. prune_freq (number) threshold use trimming table using event incidence rate column. ref_arm (character) level reference arm case arm comparison. sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. strata_var (character) names variables stratified analysis. subgroup_var (character) variable names can used subgroups. sum_vars (character) names variables summarized. time_points (character) time points can used tern::surv_timepoint(). time_unit_var (character) name variable representing time units. title (character) title output. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). treatment_flag (character) name value indicating treatment records treatment_flag_var. treatment_flag_var (character) name treatment flag variable. useNA (character) whether missing data (NA) displayed level. var_labels (named character) optional variable labels relabeling analysis variables. visit_var (character) variable names can used visit variable. Must factor dataname. worst_flag_indicator (character) value indicating worst grade. worst_flag_var (character) name worst flag variable.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standard Template Arguments — template_arguments","text":"list expressions generate table plot object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_arguments.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standard Template Arguments — template_arguments","text":"Although function just returns NULL two uses, teal module users provides documentation arguments commonly consistently used framework. developer adds single reference point import roxygen argument description : @inheritParams template_arguments","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_basic_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Basic Info — template_basic_info","title":"Template: Patient Profile Basic Info — template_basic_info","text":"Creates valid expression generate patient profile basic info report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_basic_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Basic Info — template_basic_info","text":"","code":"template_basic_info(dataname = \"ANL\", vars, patient_id = NULL)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_basic_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Basic Info — template_basic_info","text":"dataname (character) analysis data used teal module. vars (character) names variables shown table. patient_id (character) patient ID.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_basic_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Basic Info — template_basic_info","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_binary_outcome.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Binary Outcome — template_binary_outcome","title":"Template: Binary Outcome — template_binary_outcome","text":"Creates valid expression generate binary outcome analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_binary_outcome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Binary Outcome — template_binary_outcome","text":"","code":"template_binary_outcome( dataname, parentname, arm_var, paramcd, ref_arm = NULL, comp_arm = NULL, compare_arm = FALSE, combine_comp_arms = FALSE, aval_var = \"AVALC\", show_rsp_cat = TRUE, responder_val = c(\"Complete Response (CR)\", \"Partial Response (PR)\"), responder_val_levels = responder_val, control = list(global = list(method = \"waldcc\", conf_level = 0.95), unstrat = list(method_ci = \"waldcc\", method_test = \"schouten\", odds = TRUE), strat = list(method_ci = \"cmh\", method_test = \"cmh\", strat = NULL)), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_binary_outcome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Binary Outcome — template_binary_outcome","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) response parameter value use table title. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. show_rsp_cat (logical) display multinomial response estimations. responder_val (character) short label observations translate AVALC responder/non-responder. responder_val_levels (character) levels responses shown multinomial response estimations. control (list) list settings analysis. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_binary_outcome.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Binary Outcome — template_binary_outcome","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_m.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Multi-Variable Cox Regression — template_coxreg_m","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"Creates valid expression generate multi-variable Cox regression analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_m.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"","code":"template_coxreg_m( dataname, cov_var, arm_var, cnsr_var, aval_var, ref_arm, comp_arm, paramcd, at = list(), strata_var = NULL, combine_comp_arms = FALSE, control = control_coxreg(), na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_m.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"dataname (character) analysis data used teal module. cov_var (character) names covariates variables. arm_var (character) variable names can used arm_var. cnsr_var (character) name censoring variable. aval_var (character) name analysis value variable. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. paramcd (character) name parameter code variable. (list numeric) candidate covariate numeric type variable, use specify value covariate effect estimated. strata_var (character) names variables stratified analysis. combine_comp_arms (logical) triggers combination comparison arms. control (list) list settings analysis (see tern::control_coxreg()). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_m.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_u.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Univariable Cox Regression — template_coxreg_u","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"Creates valid expression generate univariable Cox regression analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_u.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"","code":"template_coxreg_u( dataname, cov_var, arm_var, cnsr_var, aval_var, ref_arm, comp_arm, paramcd, at = list(), strata_var = NULL, combine_comp_arms = FALSE, control = control_coxreg(), na_level = default_na_str(), append = FALSE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_u.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"dataname (character) analysis data used teal module. cov_var (character) names covariates variables. arm_var (character) variable names can used arm_var. cnsr_var (character) name censoring variable. aval_var (character) name analysis value variable. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. paramcd (character) name parameter code variable. (list numeric) candidate covariate numeric type variable, use specify value covariate effect estimated. strata_var (character) names variables stratified analysis. combine_comp_arms (logical) triggers combination comparison arms. control (list) list settings analysis (see tern::control_coxreg()). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). append (logical) whether result appended previous one. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_coxreg_u.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Events by Term — template_events","title":"Template: Events by Term — template_events","text":"Creates valid expression generate table events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Events by Term — template_events","text":"","code":"template_events( dataname, parentname, arm_var, hlt, llt, label_hlt = NULL, label_llt = NULL, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", sort_criteria = c(\"freq_desc\", \"alpha\"), sort_freq_col = total_label, prune_freq = 0, prune_diff = 0, drop_arm_levels = TRUE, incl_overall_sum = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Events by Term — template_events","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. hlt (character) name variable high level term events. llt (character) name variable low level term events. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. sort_freq_col (character) column sort frequency sort_criteria set freq_desc. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. incl_overall_sum (flag) whether two rows summarize overall number adverse events included top table. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Events by Term — template_events","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Events by Grade — template_events_by_grade","title":"Template: Events by Grade — template_events_by_grade","text":"Creates valid expression generate table summarize events grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Events by Grade — template_events_by_grade","text":"","code":"template_events_by_grade( dataname, parentname, arm_var, id = \"\", hlt, llt, label_hlt = NULL, label_llt = NULL, grade, label_grade = NULL, prune_freq = 0, prune_diff = 0, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Events by Grade — template_events_by_grade","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. id (character) unique identifier patients datasets, default \"USUBJID\". hlt (character) name variable high level term events. llt (character) name variable low level term events. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. grade (character) name severity level variable. label_grade (string) label grade variable dataname. label extracted module. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Events by Grade — template_events_by_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_col_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"Creates valid expression generate table summarize adverse events grouped grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_col_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"","code":"template_events_col_by_grade( dataname, parentname, arm_var, grading_groups = list(`Any Grade (%)` = c(\"1\", \"2\", \"3\", \"4\", \"5\"), `Grade 1-2 (%)` = c(\"1\", \"2\"), `Grade 3-4 (%)` = c(\"3\", \"4\"), `Grade 5 (%)` = \"5\"), add_total = TRUE, total_label = default_total_label(), id = \"USUBJID\", hlt, llt, label_hlt = NULL, label_llt = NULL, grade = \"AETOXGR\", label_grade = NULL, prune_freq = 0.1, prune_diff = 0, na_level = default_na_str(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_col_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. grading_groups (list) named list grading groups. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). id (character) name variable uniquely identify patients datasets. hlt (character) name variable high level term events. llt (character) name variable low level term events. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. grade (character) name grade variable base grading_groups . label_grade (character) label grade variable dataname. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_col_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_patyear.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"Creates valid expression generate table event rates adjusted patient-years.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_patyear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"","code":"template_events_patyear( dataname, parentname, arm_var, events_var, label_paramcd, aval_var = \"AVAL\", add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), control = control_incidence_rate(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_patyear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. events_var (character) name variable number observed events. label_paramcd (character)paramcd variable text use table title. aval_var (character) name analysis value variable. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). control (list) list settings analysis. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_patyear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Adverse Events Summary — template_events_summary","title":"Template: Adverse Events Summary — template_events_summary","text":"Creates valid expression generate adverse events summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Adverse Events Summary — template_events_summary","text":"","code":"template_events_summary( anl_name, parentname, arm_var, dthfl_var = \"DTHFL\", dcsreas_var = \"DCSREAS\", flag_var_anl = NULL, flag_var_aesi = NULL, aeseq_var = \"AESEQ\", llt = \"AEDECOD\", add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), count_dth = TRUE, count_wd = TRUE, count_subj = TRUE, count_pt = TRUE, count_events = TRUE )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Adverse Events Summary — template_events_summary","text":"anl_name (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. dthfl_var (character) name variable subject death flag parentname. Records \"Y\" summarized table row \"Total number deaths\". dcsreas_var (character) name variable study discontinuation reason parentname. Records \"ADVERSE EVENTS\" summarized table row \"Total number patients withdrawn study due AE\". flag_var_anl (character) name flag variable dataset used count adverse event sub-groups (e.g. Serious events, Related events, etc.). Variable labels used table row names exist. flag_var_aesi (character) name flag variable dataset used count adverse event special interest groups. flag variables must type logical. Variable labels used table row names exist. aeseq_var (character) name variable adverse events sequence number dataset. Used counting total number events. llt (character) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). count_dth (logical) whether show count total deaths (based dthfl_var). Defaults TRUE. count_wd (logical) whether show count patients withdrawn study due adverse event (based dcsreas_var). Defaults TRUE. count_subj (logical) whether show count unique subjects (based USUBJID). applies event flag variables provided. count_pt (logical) whether show count unique preferred terms (based llt). applies event flag variables provided. count_events (logical) whether show count events (based aeseq_var). applies event flag variables provided.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_events_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Adverse Events Summary — template_events_summary","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_exposure.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Exposure Table for Risk management plan — template_exposure","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"Creates valid expression generate exposure table risk management plan.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_exposure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"","code":"template_exposure( parentname, dataname, id_var, paramcd, paramcd_label = NULL, row_by_var, col_by_var = NULL, add_total = FALSE, total_label = \"Total\", add_total_row = TRUE, total_row_label = \"Total number of patients and patient time*\", drop_levels = TRUE, na_level = default_na_str(), aval_var, avalu_var, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_exposure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. id_var (character) variable name subject id. paramcd (character) name parameter code variable. paramcd_label (character) column dataname dataset value used label argument paramcd. row_by_var (character) variable name used split values rows. col_by_var (character) variable name used split values columns. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). add_total_row (flag) whether \"total\" level added others includes levels constitute split. custom label can set level via total_row_label argument. total_row_label (character) string display total row label row enabled (see add_total_row). drop_levels (flag) whether empty rows removed table. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). aval_var (character) name analysis value variable. avalu_var (character) name analysis value unit variable. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_exposure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_fit_mmrm.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"Creates valid expression generate analysis tables plots Mixed Model Repeated Measurements.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_fit_mmrm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"","code":"template_fit_mmrm( parentname, dataname, aval_var, arm_var, ref_arm, comp_arm = NULL, combine_comp_arms = FALSE, id_var, visit_var, cov_var, conf_level = 0.95, method = \"Satterthwaite\", cor_struct = \"unstructured\", weights_emmeans = \"proportional\", parallel = FALSE ) template_mmrm_tables( parentname, dataname, fit_name, arm_var, ref_arm, visit_var, paramcd, show_relative = c(\"increase\", \"reduction\", \"none\"), table_type = \"t_mmrm_cov\", total_label = default_total_label(), basic_table_args = teal.widgets::basic_table_args() ) template_mmrm_plots( fit_name, lsmeans_plot = list(select = c(\"estimates\", \"contrasts\"), width = 0.6, show_pval = FALSE), diagnostic_plot = list(type = \"fit-residual\", z_threshold = NULL), ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_fit_mmrm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. aval_var (character) name analysis value variable. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. combine_comp_arms (logical) triggers combination comparison arms. id_var (character) variable name subject id. visit_var (character) variable names can used visit variable. Must factor dataname. cov_var (character) names covariates variables. conf_level (numeric) value confidence level within range (0, 1). method (string) string specifying adjustment method. cor_struct (string) string specifying correlation structure, defaults \"unstructured\". See tern.mmrm::build_formula() options. weights_emmeans argument emmeans::emmeans(), \"proportional\" default. parallel (flag) flag controls whether optimizer search can use available free cores machine (default). fit_name (string) name fitted MMRM object. paramcd (character) name parameter code variable. show_relative (string) \"reduction\" (control - treatment, default) \"increase\" (treatment - control) shown relative change baseline. table_type (string) type table output. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). lsmeans_plot (named list) list controls LS means plot. See tern.mmrm::g_mmrm_lsmeans(). diagnostic_plot (named list) list controls diagnostic_plot. See tern.mmrm::g_mmrm_diagnostic(). ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_fit_mmrm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"list expressions generate table plot object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_fit_mmrm.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"template_mmrm_tables(): Creates valid expressions generate MMRM LS means, covariance matrix, fixed effects, diagnostic tables. template_mmrm_plots(): Creates valid expressions generate MMRM LS means diagnostic plots.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_rsp.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Response Forest Plot — template_forest_rsp","title":"Template: Response Forest Plot — template_forest_rsp","text":"Creates valid expression generate response forest plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_rsp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Response Forest Plot — template_forest_rsp","text":"","code":"template_forest_rsp( dataname = \"ANL\", parentname = \"ADSL\", arm_var, ref_arm = NULL, comp_arm = NULL, obj_var_name = \"\", aval_var = \"AVALC\", responders = c(\"CR\", \"PR\"), subgroup_var, strata_var = NULL, stats = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"), riskdiff = NULL, conf_level = 0.95, col_symbol_size = NULL, rel_width_forest = 0.25, font_size = 15, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_rsp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Response Forest Plot — template_forest_rsp","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. obj_var_name (character) additional text append table title. aval_var (character) name analysis value variable. responders (character) values aval_var considered responders. subgroup_var (character) variable names can used subgroups. strata_var (character) names variables stratified analysis. stats (character) names statistics reported among: n: Total number observations per group. n_rsp: Number responders per group. prop: Proportion responders. n_tot: Total number observations. : Odds ratio. ci : Confidence interval odds ratio. pval: p-value effect. Note, statistics n_tot, , ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. conf_level (numeric) value confidence level within range (0, 1). col_symbol_size (integer NULL) column index used determine relative size estimator plot symbol. Typically, symbol size proportional sample size used calculate estimator. NULL, symbol size used subgroups. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric(1)) font size. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, caption. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_rsp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Response Forest Plot — template_forest_rsp","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Survival Forest Plot — template_forest_tte","title":"Template: Survival Forest Plot — template_forest_tte","text":"Creates valid expression generate survival forest plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Survival Forest Plot — template_forest_tte","text":"","code":"template_forest_tte( dataname = \"ANL\", parentname = \"ANL_ADSL\", arm_var, ref_arm = NULL, comp_arm = NULL, obj_var_name = \"\", aval_var = \"AVAL\", cnsr_var = \"CNSR\", subgroup_var, strata_var = NULL, stats = c(\"n_tot_events\", \"n_events\", \"median\", \"hr\", \"ci\"), riskdiff = NULL, conf_level = 0.95, col_symbol_size = NULL, time_unit_var = \"AVALU\", rel_width_forest = 0.25, font_size = 15, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Survival Forest Plot — template_forest_tte","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. obj_var_name (character) additional text append table title. aval_var (character) name analysis value variable. cnsr_var (character) name censoring variable. subgroup_var (character) variable names can used subgroups. strata_var (character) names variables stratified analysis. stats (character) names statistics reported among: n_tot_events: Total number events per group. n_events: Number events per group. n_tot: Total number observations per group. n: Number observations per group. median: Median survival time. hr: Hazard ratio. ci: Confidence interval hazard ratio. pval: p-value effect. Note, one statistics n_tot n_tot_events, well hr ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. conf_level (numeric) value confidence level within range (0, 1). col_symbol_size (integer NULL) column index used determine relative size estimator plot symbol. Typically, symbol size proportional sample size used calculate estimator. NULL, symbol size used subgroups. time_unit_var (character) name variable representing time units. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_forest_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Survival Forest Plot — template_forest_tte","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Confidence Interval Plot — template_g_ci","title":"Template: Confidence Interval Plot — template_g_ci","text":"Creates valid expression generate ggplot2::ggplot() confidence interval plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Confidence Interval Plot — template_g_ci","text":"","code":"template_g_ci( dataname, x_var, y_var, grp_var = NULL, stat = c(\"mean\", \"median\"), conf_level = 0.95, unit_var = \"AVALU\", ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Confidence Interval Plot — template_g_ci","text":"dataname (character) analysis data used teal module. x_var (character) name treatment variable put x-axis. y_var (character) name response variable put y-axis. grp_var (character) name group variable used determine plot colors, point shapes, line types. stat (character) statistic plot. Options \"mean\" \"median\". conf_level (numeric) value confidence level within range (0, 1). unit_var (character) name unit variable. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Confidence Interval Plot — template_g_ci","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ipp.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Individual Patient Plots — template_g_ipp","title":"Template: Individual Patient Plots — template_g_ipp","text":"Creates valid expression generate ggplot2::ggplot() plots individual patients.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ipp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Individual Patient Plots — template_g_ipp","text":"","code":"template_g_ipp( dataname = \"ANL\", paramcd, arm_var, arm_levels, avalu_first, paramcd_first, aval_var = \"AVAL\", avalu_var = \"AVALU\", id_var = \"USUBJID\", visit_var = \"AVISIT\", base_var = lifecycle::deprecated(), baseline_var = \"BASE\", add_baseline_hline = FALSE, separate_by_obs = FALSE, ggplot2_args = teal.widgets::ggplot2_args(), suppress_legend = FALSE, add_avalu = TRUE )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ipp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Individual Patient Plots — template_g_ipp","text":"dataname (character) analysis data used teal module. paramcd (character) name parameter code variable. arm_var (character) variable names can used arm_var. arm_levels (character) vector levels arm_var. avalu_first (character)avalu_var text append plot title y-axis label add_avalu TRUE. paramcd_first (character)paramcd text append plot title y-axis label. aval_var (character) name analysis value variable. avalu_var (character) name analysis value unit variable. id_var (character) variable name subject id. visit_var (character) name variable visit timepoints. base_var Please use baseline_var argument instead. baseline_var (character) name variable baseline values analysis variable. add_baseline_hline (logical) whether horizontal line added plot baseline y-value. separate_by_obs (logical) whether create multi-panel plots. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, x, y. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). suppress_legend (logical) whether suppress plot legend. add_avalu (logical) whether avalu_first text appended plot title y-axis label.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_ipp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Individual Patient Plots — template_g_ipp","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_km.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Kaplan-Meier Plot — template_g_km","title":"Template: Kaplan-Meier Plot — template_g_km","text":"Creates valid expression generate Kaplan-Meier plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_km.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Kaplan-Meier Plot — template_g_km","text":"","code":"template_g_km( dataname = \"ANL\", arm_var = \"ARM\", ref_arm = NULL, comp_arm = NULL, compare_arm = FALSE, combine_comp_arms = FALSE, aval_var = \"AVAL\", cnsr_var = \"CNSR\", xticks = NULL, strata_var = NULL, time_points = NULL, facet_var = \"SEX\", font_size = 11, conf_level = 0.95, ties = \"efron\", xlab = \"Survival time\", time_unit_var = \"AVALU\", yval = \"Survival\", ylim = NULL, pval_method = \"log-rank\", annot_surv_med = TRUE, annot_coxph = TRUE, control_annot_surv_med = control_surv_med_annot(), control_annot_coxph = control_coxph_annot(x = 0.27, y = 0.35, w = 0.3), legend_pos = NULL, position_coxph = lifecycle::deprecated(), width_annots = lifecycle::deprecated(), rel_height_plot = 0.8, ci_ribbon = FALSE, title = \"KM Plot\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Kaplan-Meier Plot — template_g_km","text":"dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. cnsr_var (character) name censoring variable. xticks (numeric NULL) numeric vector tick positions single number spacing ticks x-axis. NULL (default), labeling::extended() used determine optimal tick positions x-axis. strata_var (character) names variables stratified analysis. time_points (character) time points can used tern::surv_timepoint(). facet_var (character) name variable use facet plot. font_size (numeric) font size value. conf_level (numeric) value confidence level within range (0, 1). ties (string) among exact (equivalent DISCRETE SAS), efron breslow, see survival::coxph(). Note: equivalent SAS EXACT method R. xlab (string) x-axis label. time_unit_var (character) name variable representing time units. yval (string) type plot, plotted y-axis. Options Survival (default) Failure probability. ylim (numeric(2)) vector containing lower upper limits y-axis, respectively. NULL (default), default scale range used. pval_method (string) method used estimation p.values; wald (default) likelihood. annot_surv_med (flag) compute add annotation table Kaplan-Meier curve estimating median survival time per group. annot_coxph (flag) whether add annotation table survival::coxph() model. control_annot_surv_med (list) parameters control position size annotation table added plot annot_surv_med = TRUE, specified using control_surv_med_annot() function. Parameter options : x, y, w, h, fill. See control_surv_med_annot() details. control_annot_coxph (list) parameters control position size annotation table added plot annot_coxph = TRUE, specified using control_coxph_annot() function. Parameter options : x, y, w, h, fill, ref_lbls. See control_coxph_annot() details. legend_pos (numeric(2) NULL) vector containing x- y-coordinates, respectively, legend position relative KM plot area. NULL (default), legend positioned bottom right corner plot, middle right plot needed prevent overlapping. position_coxph Please use x y elements control_annot_coxph instead. width_annots Please use w element control_annot_surv_med (surv_med) control_annot_coxph (coxph).\" rel_height_plot (proportion) proportion total figure height allocate Kaplan-Meier plot. Relative height patients risk table 1 - rel_height_plot. annot_at_risk = FALSE as_list = TRUE, parameter ignored. ci_ribbon (flag) whether confidence interval drawn around Kaplan-Meier curve. title (character) title output.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_km.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Kaplan-Meier Plot — template_g_km","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_lineplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Line Plot — template_g_lineplot","title":"Template: Line Plot — template_g_lineplot","text":"Creates valid expression generate ggplot2::ggplot() line plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_lineplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Line Plot — template_g_lineplot","text":"","code":"template_g_lineplot( dataname = \"ANL\", strata = lifecycle::deprecated(), group_var = \"ARM\", x = \"AVISIT\", y = \"AVAL\", y_unit = \"AVALU\", paramcd = \"PARAMCD\", param = \"ALT\", mid = \"mean\", interval = \"mean_ci\", whiskers = c(\"mean_ci_lwr\", \"mean_ci_upr\"), table = c(\"n\", \"mean_sd\", \"median\", \"range\"), mid_type = \"pl\", conf_level = 0.95, incl_screen = TRUE, mid_point_size = 2, table_font_size = 4, title = \"Line Plot\", y_lab = \"\", ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_lineplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Line Plot — template_g_lineplot","text":"dataname (character) analysis data used teal module. strata Please use group_var argument instead. group_var (string NA) group variable name. x (string) x-variable name. y (string) y-variable name. y_unit (string NA) y-axis unit variable name. paramcd (string NA) parameter code variable name. param (character) parameter filter data . mid (character NULL) names statistics plotted midpoints. statistics indicated mid variable must present object returned sfun, double numeric type vector length one. interval (character NULL) names statistics plotted intervals. statistics indicated interval variable must present object returned sfun, double numeric type vector length two. Set interval = NULL intervals added plot. whiskers (character) names interval whiskers plotted. Names must match names list element interval returned sfun (e.g. mean_ci_lwr element sfun(x)[[\"mean_ci\"]]). possible specify one whisker , suppress whiskers setting interval = NULL. table (character NULL) names statistics displayed table plot. statistics indicated table variable must present object returned sfun. mid_type (string) controls type mid plot, can point (\"p\"), line (\"l\"), point line (\"pl\"). conf_level (numeric) value confidence level within range (0, 1). incl_screen (logical) whether screening visit included. mid_point_size (numeric(1)) font size mid plot points. table_font_size (numeric(1)) font size text table. title (string) plot title. y_lab (string NULL) y-axis label. NULL label added. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, caption, y, lty. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_g_lineplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Line Plot — template_g_lineplot","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_laboratory.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Laboratory Table — template_laboratory","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"Creates valid expression generate patient profile laboratory table using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_laboratory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"","code":"template_laboratory( dataname = \"ANL\", paramcd = \"PARAMCD\", param = \"PARAM\", anrind = \"ANRIND\", timepoints = \"ADY\", aval = lifecycle::deprecated(), aval_var = \"AVAL\", avalu = lifecycle::deprecated(), avalu_var = \"AVALU\", patient_id = NULL, round_value = 0L )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_laboratory.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"dataname (character) analysis data used teal module. paramcd (character) name parameter code variable. param (character) name parameter variable. anrind (character) name analysis reference range indicator variable. timepoints (character) name time variable. aval Please use aval_var argument instead. aval_var (character) name analysis value variable. avalu Please use avalu_var argument instead. avalu_var (character) name analysis value unit variable. patient_id (character) patient ID. round_value (numeric) number decimal places round .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_laboratory.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Logistic Regression — template_logistic","title":"Template: Logistic Regression — template_logistic","text":"Creates valid expression generate logistic regression table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Logistic Regression — template_logistic","text":"","code":"template_logistic( dataname, arm_var, aval_var, paramcd = lifecycle::deprecated(), label_paramcd, cov_var, interaction_var, ref_arm, comp_arm, topleft = \"Logistic Regression\", conf_level = 0.95, combine_comp_arms = FALSE, responder_val = c(\"CR\", \"PR\"), at = NULL, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Logistic Regression — template_logistic","text":"dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. fit logistic model arm/treatment variable, set NULL. aval_var (character) name analysis value variable. paramcd paramcd argument used function. label_paramcd (character) label response parameter value print table title. cov_var (character) names covariates variables. interaction_var (character) names variables can used interaction variable selection. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. topleft (character) text use top-left annotation table. conf_level (numeric) value confidence level within range (0, 1). combine_comp_arms (logical) triggers combination comparison arms. responder_val (character) values responder variable corresponding successful response. (numeric NULL) optional values interaction variable. Otherwise median used. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Logistic Regression — template_logistic","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_medical_history.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Medical History — template_medical_history","title":"Template: Patient Profile Medical History — template_medical_history","text":"Creates valid expression generate patient profile medical history report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_medical_history.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Medical History — template_medical_history","text":"","code":"template_medical_history( dataname = \"ANL\", mhterm = \"MHTERM\", mhbodsys = \"MHBODSYS\", mhdistat = \"MHDISTAT\", patient_id = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_medical_history.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Medical History — template_medical_history","text":"dataname (character) analysis data used teal module. mhterm (character) name reported term medical history variable. mhbodsys (character) name body system organ class variable. mhdistat (character) name status disease variable. patient_id (character) patient ID.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_medical_history.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Medical History — template_medical_history","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_mult_events.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Multiple Events by Term — template_mult_events","title":"Template: Multiple Events by Term — template_mult_events","text":"Creates valid expression generate table multiple events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_mult_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Multiple Events by Term — template_mult_events","text":"","code":"template_mult_events( dataname, parentname, arm_var, seq_var, hlt, llt, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_mult_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Multiple Events by Term — template_mult_events","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. seq_var (character) name analysis sequence number variable. Used counting unique number events. hlt (character) name variable high level term events. llt (character) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_mult_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Multiple Events by Term — template_mult_events","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_patient_timeline.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Timeline Plot — template_patient_timeline","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"Creates valid expression generate patient profile timeline ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_patient_timeline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"","code":"template_patient_timeline( dataname = \"ANL\", aeterm = \"AETERM\", aetime_start = \"ASTDTM\", aetime_end = \"AENDTM\", dstime_start = \"CMASTDTM\", dstime_end = \"CMAENDTM\", cmdecod = \"CMDECOD\", aerelday_start = NULL, aerelday_end = NULL, dsrelday_start = NULL, dsrelday_end = NULL, relative_day = FALSE, patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_patient_timeline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"dataname (character) analysis data used teal module. aeterm (character) name reported term adverse event variable. aetime_start (character) name start date/time adverse event variable. aetime_end (character) name end date/time adverse event variable. dstime_start (character) name date/time first exposure treatment variable. dstime_end (character) name date/time last exposure treatment variable. cmdecod (character) name standardized medication name variable. aerelday_start (character) name adverse event study start day variable. aerelday_end (character) name adverse event study end day variable. dsrelday_start (character) name concomitant medications study start day variable. dsrelday_end (character) name concomitant medications study day start variable. relative_day (logical) whether use relative days (TRUE) absolute dates (FALSE). patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_patient_timeline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_prior_medication.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Prior Medication — template_prior_medication","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"Creates valid expression generate patient profile prior medication report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_prior_medication.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"","code":"template_prior_medication( dataname = \"ANL\", atirel = \"ATIREL\", cmdecod = \"CMDECOD\", cmindc = \"CMINDC\", cmstdy = \"CMSTDY\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_prior_medication.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"dataname (character) analysis data used teal module. atirel (character) name time relation medication variable. cmdecod (character) name standardized medication name variable. cmindc (character) name indication variable. cmstdy (character) name study relative day start medication variable.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_prior_medication.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Shift by Arm — template_shift_by_arm","title":"Template: Shift by Arm — template_shift_by_arm","text":"Creates valid expression generate summary table analysis indicator levels arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Shift by Arm — template_shift_by_arm","text":"","code":"template_shift_by_arm( dataname, parentname, arm_var = \"ARM\", paramcd = \"PARAMCD\", visit_var = \"AVISIT\", treatment_flag_var = \"ONTRTFL\", treatment_flag = \"Y\", aval_var = \"ANRIND\", base_var = lifecycle::deprecated(), baseline_var = \"BNRIND\", na.rm = FALSE, na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Shift by Arm — template_shift_by_arm","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) name parameter code variable. visit_var (character) variable names can used visit variable. Must factor dataname. treatment_flag_var (character) name treatment flag variable. treatment_flag (character) name value indicating treatment records treatment_flag_var. aval_var (character) name analysis reference range indicator variable. base_var Please use baseline_var argument instead. baseline_var (character) name baseline reference range indicator variable. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Shift by Arm — template_shift_by_arm","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm_by_worst.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"Creates valid expression generate summary table worst analysis indicator variable level per subject arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm_by_worst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"","code":"template_shift_by_arm_by_worst( dataname, parentname, arm_var = \"ARM\", paramcd = \"PARAMCD\", worst_flag_var = \"WORS02FL\", worst_flag = \"Y\", treatment_flag_var = \"ONTRTFL\", treatment_flag = \"Y\", aval_var = \"ANRIND\", base_var = lifecycle::deprecated(), baseline_var = \"BNRIND\", na.rm = FALSE, na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm_by_worst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) name parameter code variable. worst_flag_var (character) name worst flag variable. worst_flag (character) value indicating worst analysis indicator level. treatment_flag_var (character) name treatment flag variable. treatment_flag (character) name value indicating treatment records treatment_flag_var. aval_var (character) name analysis reference range indicator variable. base_var Please use baseline_var argument instead. baseline_var (character) name baseline reference range indicator variable. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_arm_by_worst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Grade Summary Table — template_shift_by_grade","title":"Template: Grade Summary Table — template_shift_by_grade","text":"Creates valid expression generate grade summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Grade Summary Table — template_shift_by_grade","text":"","code":"template_shift_by_grade( parentname, dataname, arm_var = \"ARM\", id_var = \"USUBJID\", visit_var = \"AVISIT\", worst_flag_var = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\"), worst_flag_indicator = \"Y\", anl_toxgrade_var = \"ATOXGR\", base_toxgrade_var = \"BTOXGR\", paramcd = \"PARAMCD\", drop_arm_levels = TRUE, add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), code_missing_baseline = FALSE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Grade Summary Table — template_shift_by_grade","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. visit_var (character) variable names can used visit variable. Must factor dataname. worst_flag_var (character) name worst flag variable. worst_flag_indicator (character) value indicating worst grade. anl_toxgrade_var (character) name variable indicating analysis toxicity grade. base_toxgrade_var (character) name variable indicating baseline toxicity grade. paramcd (character) name parameter code variable. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). code_missing_baseline (logical) whether missing baseline grades counted grade 0. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_shift_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Grade Summary Table — template_shift_by_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_smq.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"Creates valid expression generate adverse events table Standardized MedDRA Query.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_smq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"","code":"template_smq( dataname, parentname, arm_var, llt = \"AEDECOD\", add_total = TRUE, total_label = default_total_label(), sort_criteria = c(\"freq_desc\", \"alpha\"), drop_arm_levels = TRUE, na_level = default_na_str(), smq_varlabel = \"Standardized MedDRA Query\", baskets = c(\"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\"), id_var = \"USUBJID\", basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_smq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. llt (character) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). smq_varlabel (character) label use new column SMQ created tern::h_stack_by_baskets(). baskets (character) names selected standardized/customized queries variables. id_var (character) variable name subject id. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_smq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Summary of Variables — template_summary","title":"Template: Summary of Variables — template_summary","text":"Creates valid expression generate table summarize variables.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Summary of Variables — template_summary","text":"","code":"template_summary( dataname, parentname, arm_var, sum_vars, show_labels = lifecycle::deprecated(), add_total = TRUE, total_label = default_total_label(), var_labels = character(), arm_var_labels = NULL, na.rm = FALSE, na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"mean_ci\", \"median\", \"median_ci\", \"quantiles\", \"range\", \"geom_mean\"), denominator = c(\"N\", \"n\", \"omit\"), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Summary of Variables — template_summary","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. sum_vars (character) names variables summarized. show_labels add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). var_labels (named character) optional variable labels relabeling analysis variables. arm_var_labels (character NULL) vector column variable labels display, length arm_var. NULL, labels displayed. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Summary of Variables — template_summary","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary_by.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Summarize Variables by Row Groups Module — template_summary_by","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"Creates valid expression generate table summarize variables row groups.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary_by.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"","code":"template_summary_by( parentname, dataname, arm_var, id_var, sum_vars, by_vars, var_labels = character(), add_total = TRUE, total_label = default_total_label(), parallel_vars = FALSE, row_groups = FALSE, na.rm = FALSE, na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"mean_ci\", \"median\", \"median_ci\", \"quantiles\", \"range\"), denominator = c(\"N\", \"n\", \"omit\"), drop_arm_levels = TRUE, drop_zero_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary_by.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. sum_vars (character) names variables summarized. by_vars (character) variable names used split summary rows. var_labels (named character) optional variable labels relabeling analysis variables. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). parallel_vars (logical) whether summarized variables arranged columns. Can set TRUE chosen analysis variables numeric. row_groups (logical) whether summarized variables arranged row groups. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. drop_zero_levels (logical) whether rows zero counts columns removed table. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_summary_by.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_therapy.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Therapy Table and Plot — template_therapy","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"Creates valid expression generate patient profile therapy table ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_therapy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"","code":"template_therapy( dataname = \"ANL\", atirel = \"ATIREL\", cmdecod = \"CMDECOD\", cmindc = \"CMINDC\", cmdose = \"CMDOSE\", cmtrt = \"CMTRT\", cmdosu = \"CMDOSU\", cmroute = \"CMROUTE\", cmdosfrq = \"CMDOSFRQ\", cmstdy = \"CMSTDY\", cmendy = \"CMENDY\", patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_therapy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"dataname (character) analysis data used teal module. atirel (character) name time relation medication variable. cmdecod (character) name standardized medication name variable. cmindc (character) name indication variable. cmdose (character) name dose per administration variable. cmtrt (character) name reported name drug, med, therapy variable. cmdosu (character) name dose units variable. cmroute (character) name route administration variable. cmdosfrq (character) name dosing frequency per interval variable. cmstdy (character) name study relative day start medication variable. cmendy (character) name study day end medication variable. patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_therapy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Time-To-Event — template_tte","title":"Template: Time-To-Event — template_tte","text":"Creates valid expression generate time--event analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Time-To-Event — template_tte","text":"","code":"template_tte( dataname = \"ANL\", parentname = \"ADSL\", arm_var = \"ARM\", paramcd, ref_arm = NULL, comp_arm = NULL, compare_arm = FALSE, combine_comp_arms = FALSE, aval_var = \"AVAL\", cnsr_var = \"CNSR\", strata_var = NULL, time_points = NULL, time_unit_var = \"AVALU\", event_desc_var = \"EVNTDESC\", control = control_tte(), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Time-To-Event — template_tte","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) endpoint parameter value use table title. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. cnsr_var (character) name censoring variable. strata_var (character) names variables stratified analysis. time_points (character) time points can used tern::surv_timepoint(). time_unit_var (character) name variable representing time units. event_desc_var (character) name variable events description. control (list) list settings analysis. See control_tte() details. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Time-To-Event — template_tte","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_vitals.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Vitals Plot — template_vitals","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"Creates valid expression generate patient profile vitals ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_vitals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"","code":"template_vitals( dataname = \"ANL\", paramcd = \"PARAMCD\", paramcd_levels = c(\"SYSBP\", \"DIABP\", \"PUL\", \"RESP\", \"OXYSAT\", \"WGHT\", \"TEMP\"), xaxis = \"ADY\", aval = lifecycle::deprecated(), aval_var = \"AVAL\", patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_vitals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"dataname (character) analysis data used teal module. paramcd (character) name parameter code variable. paramcd_levels (character) vector levels paramcd. xaxis (character) name time variable put x-axis. aval Please use aval_var argument instead. aval_var (character) name analysis value variable. patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/template_vitals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_gee.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"module produces analysis table using Generalized Estimating Equations (GEE).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_gee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"","code":"tm_a_gee( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), aval_var, id_var, arm_var, visit_var, cov_var, arm_ref_comp = NULL, paramcd, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_gee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. id_var (teal.transform::choices_selected()) object specifying variable name subject id. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_gee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_gee.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_gee.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_gee.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"","code":"library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following object is masked from ‘package:testthat’: #> #> matches #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADQS <- tmc_ex_adqs %>% filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>% mutate( AVISIT = as.factor(AVISIT), AVISITN = rank(AVISITN) %>% as.factor() %>% as.numeric() %>% as.factor(), AVALBIN = AVAL < 50 # Just as an example to get a binary endpoint. ) %>% droplevels() }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_a_gee( label = \"GEE\", dataname = \"ADQS\", aval_var = choices_selected(\"AVALBIN\", fixed = TRUE), id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"), arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"), paramcd = choices_selected( choices = value_choices(data[[\"ADQS\"]], \"PARAMCD\", \"PARAM\"), selected = \"FKSI-FWB\" ), cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL) ) ) ) #> Initializing tm_a_gee (prototype) #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"module produces analysis tables plots Mixed Model Repeated Measurements.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"","code":"tm_a_mmrm( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), aval_var, id_var, arm_var, visit_var, cov_var, arm_ref_comp = NULL, paramcd, method = teal.transform::choices_selected(c(\"Satterthwaite\", \"Kenward-Roger\", \"Kenward-Roger-Linear\"), \"Satterthwaite\", keep_order = TRUE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), plot_height = c(700L, 200L, 2000L), plot_width = NULL, total_label = default_total_label(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. id_var (teal.transform::choices_selected()) object specifying variable name subject id. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. method (teal.transform::choices_selected()) object available choices pre-selected option adjustment method. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings plots named list ggplot2_args objects plot-specific settings. List names match following: c(\"default\", \"lsmeans\", \"diagnostic\"). argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see help vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"ordering input data sets can lead slightly different numerical results different convergence behavior. known observation used package lme4. However, convergence achieved, results reliable numerical precision.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"module generates following objects, can modified place using decorators: lsmeans_plot (ggplot2) diagnostic_plot (TableTree- output rtables::build_table) lsmeans_table (TableTree- output rtables::build_table) covariance_table (TableTree- output rtables::build_table) fixed_effects_table (TableTree- output rtables::build_table) diagnostic_table (TableTree- output rtables::build_table) Decorators can applied outputs specific objects using named list teal_transform_module objects. \"default\" name reserved decorators applied outputs. See code snippet :","code":"tm_a_mrmm( ..., # arguments for module decorators = list( default = list(teal_transform_module(...)), # applied to all outputs lsmeans_plot = list(teal_transform_module(...)) # applied only to `lsmeans_plot` output diagnostic_plot = list(teal_transform_module(...)) # applied only to `diagnostic_plot` output lsmeans_table = list(teal_transform_module(...)) # applied only to `lsmeans_table` output covariance_table = list(teal_transform_module(...)) # applied only to `covariance_table` output fixed_effects_table = list(teal_transform_module(...)) # applied only to `fixed_effects_table` output diagnostic_table = list(teal_transform_module(...)) # applied only to `diagnostic_table` output ) )"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_a_mmrm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"","code":"library(dplyr) arm_ref_comp <- list( ARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADQS <- tmc_ex_adqs %>% filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>% filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>% mutate( AVISIT = as.factor(AVISIT), AVISITN = rank(AVISITN) %>% as.factor() %>% as.numeric() %>% as.factor() #' making consecutive numeric factor ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_a_mmrm( label = \"MMRM\", dataname = \"ADQS\", aval_var = choices_selected(c(\"AVAL\", \"CHG\"), \"AVAL\"), id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"), arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( choices = value_choices(data[[\"ADQS\"]], \"PARAMCD\", \"PARAM\"), selected = \"FKSI-FWB\" ), cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL) ) ) ) #> Initializing tm_a_mmrm #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"module produces ggplot2::ggplot() type bar chart summary table counts per category.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"","code":"tm_g_barchart_simple( x = NULL, fill = NULL, x_facet = NULL, y_facet = NULL, label = \"Count Barchart\", plot_options = NULL, plot_height = c(600L, 200L, 2000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"x (data_extract_spec) variable x-axis. fill (data_extract_spec) grouping variable determine bar colors. x_facet (data_extract_spec) row-wise faceting groups. y_facet (data_extract_spec) column-wise faceting groups. label (character) menu item label module teal app. plot_options (list) list plot options. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"Categories can defined four levels deep defined x, fill, x_facet, y_facet parameters. parameters set NULL (default) ignored.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_barchart_simple.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl %>% mutate(ITTFL = factor(\"Y\") %>% with_label(\"Intent-To-Treat Population Flag\")) ADAE <- tmc_ex_adae %>% filter(!((AETOXGR == 1) & (AESEV == \"MILD\") & (ARM == \"A: Drug X\"))) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_g_barchart_simple( label = \"ADAE Analysis\", x = data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = \"ACTARM\", multiple = FALSE ) ), fill = list( data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = \"SEX\", multiple = FALSE ) ), data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\", \"AESER\")), selected = NULL, multiple = FALSE ) ) ), x_facet = list( data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\", \"AESER\")), selected = \"AETOXGR\", multiple = FALSE ) ), data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = NULL, multiple = FALSE ) ) ), y_facet = list( data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\", \"AESER\")), selected = \"AESEV\", multiple = FALSE ) ), data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = NULL, multiple = FALSE ) ) ) ) ) ) #> Initializing tm_g_barchart_simple #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Confidence Interval Plot — tm_g_ci","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"module produces ggplot2::ggplot() type confidence interval plot consistent TLG Catalog template CIG01 available .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"","code":"tm_g_ci( label, x_var, y_var, color, stat = c(\"mean\", \"median\"), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), plot_height = c(700L, 200L, 2000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"label (character) menu item label module teal app. x_var (character) name treatment variable put x-axis. y_var (character) name response variable put y-axis. color (data_extract_spec) group variable used determine plot colors, shapes, line types. stat (character) statistic plot. Options \"mean\" \"median\". conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ci.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ci.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"","code":"library(nestcolor) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_g_ci( label = \"Confidence Interval Plot\", x_var = data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = c(\"ARMCD\", \"BMRKR2\"), selected = c(\"ARMCD\"), multiple = FALSE, fixed = FALSE ) ), y_var = data_extract_spec( dataname = \"ADLB\", filter = list( filter_spec( vars = \"PARAMCD\", choices = levels(ADLB$PARAMCD), selected = levels(ADLB$PARAMCD)[1], multiple = FALSE, label = \"Select lab:\" ), filter_spec( vars = \"AVISIT\", choices = levels(ADLB$AVISIT), selected = levels(ADLB$AVISIT)[1], multiple = FALSE, label = \"Select visit:\" ) ), select = select_spec( label = \"Analyzed Value\", choices = c(\"AVAL\", \"CHG\"), selected = \"AVAL\", multiple = FALSE, fixed = FALSE ) ), color = data_extract_spec( dataname = \"ADSL\", select = select_spec( label = \"Color by variable\", choices = c(\"SEX\", \"STRATA1\", \"STRATA2\"), selected = c(\"STRATA1\"), multiple = FALSE, fixed = FALSE ) ) ) ) ) #> Initializing tm_g_ci #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_rsp.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Forest Response Plot — tm_g_forest_rsp","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"module produces grid-style forest plot response data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_rsp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"","code":"tm_g_forest_rsp( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALC\"), \"AVALC\", fixed = TRUE), subgroup_var, strata_var, stats = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"), riskdiff = NULL, fixed_symbol_size = TRUE, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), default_responses = c(\"CR\", \"PR\", \"Y\", \"Complete Response (CR)\", \"Partial Response (PR)\"), plot_height = c(500L, 200L, 2000L), plot_width = c(1500L, 800L, 3000L), rel_width_forest = c(25L, 0L, 100L), font_size = c(15L, 1L, 30L), pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_rsp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. subgroup_var (teal.transform::choices_selected()) object available choices preselected option variable names can used default subgroups. strata_var (teal.transform::choices_selected()) names variables stratified analysis. stats (character) names statistics reported among: n: Total number observations per group. n_rsp: Number responders per group. prop: Proportion responders. n_tot: Total number observations. : Odds ratio. ci : Confidence interval odds ratio. pval: p-value effect. Note, statistics n_tot, , ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. fixed_symbol_size (logical) (TRUE), symbol size used plotting estimate. Otherwise, symbol size proportional sample size subgroup. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). default_responses (list character) defines default codes response variable module per value paramcd. passed vector transmitted paramcd values. passed list must named contain arrays, name corresponding single value paramcd. array may contain default response values named arrays rsp default selected response values levels default level choices. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric(1)) font size. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, caption. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_rsp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_rsp.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_rsp.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_rsp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADRS <- tmc_ex_adrs %>% mutate(AVALC = d_onco_rsp_label(AVALC) %>% with_label(\"Character Result/Finding\")) %>% filter(PARAMCD != \"OVRINV\" | AVISIT == \"FOLLOW UP\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADRS <- data[[\"ADRS\"]] arm_ref_comp <- list( ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ), ARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) app <- init( data = data, modules = modules( tm_g_forest_rsp( label = \"Forest Response\", dataname = \"ADRS\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), \"ARMCD\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADRS, \"PARAMCD\", \"PARAM\"), \"INVET\" ), subgroup_var = choices_selected( variable_choices(ADSL, names(ADSL)), c(\"BMRKR2\", \"SEX\") ), strata_var = choices_selected( variable_choices(ADSL, c(\"STRATA1\", \"STRATA2\")), \"STRATA2\" ), plot_height = c(600L, 200L, 2000L), default_responses = list( BESRSPI = list( rsp = c(\"Stable Disease (SD)\", \"Not Evaluable (NE)\"), levels = c( \"Complete Response (CR)\", \"Partial Response (PR)\", \"Stable Disease (SD)\", \"Progressive Disease (PD)\", \"Not Evaluable (NE)\" ) ), INVET = list( rsp = c(\"Complete Response (CR)\", \"Partial Response (PR)\"), levels = c( \"Complete Response (CR)\", \"Not Evaluable (NE)\", \"Partial Response (PR)\", \"Progressive Disease (PD)\", \"Stable Disease (SD)\" ) ), OVRINV = list( rsp = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\"), levels = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\", \"Not Evaluable (NE)\") ) ) ) ) ) #> Initializing tm_g_forest_rsp #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Forest Survival Plot — tm_g_forest_tte","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"module produces grid-style forest plot time--event data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"","code":"tm_g_forest_tte( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, subgroup_var, paramcd, strata_var, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), stats = c(\"n_tot_events\", \"n_events\", \"median\", \"hr\", \"ci\"), riskdiff = NULL, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), time_unit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), fixed_symbol_size = TRUE, plot_height = c(500L, 200L, 2000L), plot_width = c(1500L, 800L, 3000L), rel_width_forest = c(25L, 0L, 100L), font_size = c(15L, 1L, 30L), pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. subgroup_var (teal.transform::choices_selected()) object available choices preselected option variable names can used default subgroups. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. stats (character) names statistics reported among: n_tot_events: Total number events per group. n_events: Number events per group. n_tot: Total number observations per group. n: Number observations per group. median: Median survival time. hr: Hazard ratio. ci: Confidence interval hazard ratio. pval: p-value effect. Note, one statistics n_tot n_tot_events, well hr ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. fixed_symbol_size (logical) (TRUE), symbol size used plotting estimate. Otherwise, symbol size proportional sample size subgroup. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric(1)) font size. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_tte.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_tte.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_forest_tte.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte ADSL$RACE <- droplevels(ADSL$RACE) %>% with_label(\"Race\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] arm_ref_comp <- list( ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ), ARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) app <- init( data = data, modules = modules( tm_g_forest_tte( label = \"Forest Survival\", dataname = \"ADTTE\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), \"ARMCD\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), subgroup_var = choices_selected( variable_choices(ADSL, names(ADSL)), c(\"BMRKR2\", \"SEX\") ), strata_var = choices_selected( variable_choices(ADSL, c(\"STRATA1\", \"STRATA2\")), \"STRATA2\" ) ) ) ) #> Initializing tm_g_forest_tte #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ipp.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Individual Patient Plots — tm_g_ipp","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"module produces ggplot2::ggplot() type individual patient plots display trends parameter values time patient, using data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ipp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"","code":"tm_g_ipp( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, paramcd, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"USUBJID\"), \"USUBJID\", fixed = TRUE), visit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVISIT\"), \"AVISIT\", fixed = TRUE), aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), avalu_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), base_var = lifecycle::deprecated(), baseline_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"BASE\"), \"BASE\", fixed = TRUE), add_baseline_hline = FALSE, separate_by_obs = FALSE, suppress_legend = FALSE, add_avalu = TRUE, plot_height = c(1200L, 400L, 5000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ipp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable values can used arm variable. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. id_var (teal.transform::choices_selected()) object specifying variable name subject id. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. base_var Please use baseline_var argument instead. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. add_baseline_hline (logical) whether horizontal line added plot baseline y-value. separate_by_obs (logical) whether create multi-panel plots. suppress_legend (logical) whether suppress plot legend. add_avalu (logical) whether avalu_first text appended plot title y-axis label. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, x, y. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ipp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ipp.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ipp.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_ipp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl %>% slice(1:20) %>% df_explicit_na() ADLB <- tmc_ex_adlb %>% filter(USUBJID %in% ADSL$USUBJID) %>% df_explicit_na() %>% filter(AVISIT != \"SCREENING\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_g_ipp( label = \"Individual Patient Plot\", dataname = \"ADLB\", arm_var = choices_selected( value_choices(ADLB, \"ARMCD\"), \"ARM A\" ), paramcd = choices_selected( value_choices(ADLB, \"PARAMCD\"), \"ALT\" ), aval_var = choices_selected( variable_choices(ADLB, c(\"AVAL\", \"CHG\")), \"AVAL\" ), avalu_var = choices_selected( variable_choices(ADLB, c(\"AVALU\")), \"AVALU\", fixed = TRUE ), id_var = choices_selected( variable_choices(ADLB, c(\"USUBJID\")), \"USUBJID\", fixed = TRUE ), visit_var = choices_selected( variable_choices(ADLB, c(\"AVISIT\")), \"AVISIT\" ), baseline_var = choices_selected( variable_choices(ADLB, c(\"BASE\")), \"BASE\", fixed = TRUE ), add_baseline_hline = FALSE, separate_by_obs = FALSE ) ) ) #> Initializing tm_g_ipp #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_km.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Kaplan-Meier Plot — tm_g_km","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"module produces ggplot-style Kaplan-Meier plot data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_km.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"","code":"tm_g_km( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, strata_var, facet_var, time_unit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), font_size = c(11L, 1L, 30), control_annot_surv_med = control_surv_med_annot(), control_annot_coxph = control_coxph_annot(x = 0.27, y = 0.35, w = 0.3), legend_pos = c(0.9, 0.5), rel_height_plot = c(80L, 0L, 100L), plot_height = c(800L, 400L, 5000L), plot_width = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. facet_var (teal.transform::choices_selected()) object available choices preselected option names variable can used plot faceting. time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). font_size (numeric) numeric vector length 3 current, minimum maximum font size values. control_annot_surv_med (list) parameters control position size annotation table added plot annot_surv_med = TRUE, specified using control_surv_med_annot() function. Parameter options : x, y, w, h, fill. See control_surv_med_annot() details. control_annot_coxph (list) parameters control position size annotation table added plot annot_coxph = TRUE, specified using control_coxph_annot() function. Parameter options : x, y, w, h, fill, ref_lbls. See control_coxph_annot() details. legend_pos (numeric(2) NULL) vector containing x- y-coordinates, respectively, legend position relative KM plot area. NULL (default), legend positioned bottom right corner plot, middle right plot needed prevent overlapping. rel_height_plot (proportion) proportion total figure height allocate Kaplan-Meier plot. Relative height patients risk table 1 - rel_height_plot. annot_at_risk = FALSE as_list = TRUE, parameter ignored. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_km.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_km.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_km.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"","code":"library(nestcolor) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) app <- init( data = data, modules = modules( tm_g_km( label = \"Kaplan-Meier Plot\", dataname = \"ADTTE\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\" ), paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), arm_ref_comp = arm_ref_comp, strata_var = choices_selected( variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")), \"SEX\" ), facet_var = choices_selected( variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")), NULL ) ) ) ) #> Initializing tm_g_km #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_lineplot.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Line Plot — tm_g_lineplot","title":"teal Module: Line Plot — tm_g_lineplot","text":"module produces ggplot2::ggplot() type line plot, optional summary table, standard ADaM data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_lineplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Line Plot — tm_g_lineplot","text":"","code":"tm_g_lineplot( label, dataname, parentname = NULL, strata = lifecycle::deprecated(), group_var = teal.transform::choices_selected(teal.transform::variable_choices(parentname, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\"), x = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVISIT\"), \"AVISIT\", fixed = TRUE), y = teal.transform::choices_selected(teal.transform::variable_choices(dataname, c(\"AVAL\", \"BASE\", \"CHG\", \"PCHG\")), \"AVAL\"), y_unit = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), paramcd = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"PARAMCD\"), \"PARAMCD\", fixed = TRUE), param = teal.transform::choices_selected(teal.transform::value_choices(dataname, \"PARAMCD\", \"PARAM\"), \"ALT\"), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), interval = \"mean_ci\", mid = \"mean\", whiskers = c(\"mean_ci_lwr\", \"mean_ci_upr\"), table = c(\"n\", \"mean_sd\", \"median\", \"range\"), mid_type = \"pl\", mid_point_size = c(2, 1, 5), table_font_size = c(4, 2, 6), plot_height = c(1000L, 200L, 4000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_lineplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Line Plot — tm_g_lineplot","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. strata Please use group_var argument instead. group_var (string NA) group variable name. x (string) x-variable name. y (string) y-variable name. y_unit (string NA) y-axis unit variable name. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. param (character) parameter filter data . conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). interval (character NULL) names statistics plotted intervals. statistics indicated interval variable must present object returned sfun, double numeric type vector length two. Set interval = NULL intervals added plot. mid (character NULL) names statistics plotted midpoints. statistics indicated mid variable must present object returned sfun, double numeric type vector length one. whiskers (character) names interval whiskers plotted. Names must match names list element interval returned sfun (e.g. mean_ci_lwr element sfun(x)[[\"mean_ci\"]]). possible specify one whisker , suppress whiskers setting interval = NULL. table (character NULL) names statistics displayed table plot. statistics indicated table variable must present object returned sfun. mid_type (string) controls type mid plot, can point (\"p\"), line (\"l\"), point line (\"pl\"). mid_point_size (numeric(1)) font size mid plot points. table_font_size (numeric(1)) font size text table. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, caption, y, lty. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_lineplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Line Plot — tm_g_lineplot","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_lineplot.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Line Plot — tm_g_lineplot","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_lineplot.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Line Plot — tm_g_lineplot","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_lineplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Line Plot — tm_g_lineplot","text":"","code":"library(nestcolor) library(dplyr) library(forcats) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb %>% mutate(AVISIT == fct_reorder(AVISIT, AVISITN, min)) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_g_lineplot( label = \"Line Plot\", dataname = \"ADLB\", group_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\" ), y = choices_selected( variable_choices(ADLB, c(\"AVAL\", \"BASE\", \"CHG\", \"PCHG\")), \"AVAL\" ), param = choices_selected( value_choices(ADLB, \"PARAMCD\", \"PARAM\"), \"ALT\" ) ) ) ) #> Initializing tm_g_lineplot #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_adverse_events.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"module produces adverse events table ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_adverse_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"","code":"tm_g_pp_adverse_events( label, dataname = \"ADAE\", parentname = \"ADSL\", patient_col = \"USUBJID\", aeterm = NULL, tox_grade = NULL, causality = NULL, outcome = NULL, action = NULL, time = NULL, decod = 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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_adverse_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. aeterm (teal.transform::choices_selected()) object available choices preselected option AETERM variable dataname. tox_grade (teal.transform::choices_selected()) object available choices preselected option AETOXGR variable dataname. causality (teal.transform::choices_selected()) object available choices preselected option AEREL variable dataname. outcome (teal.transform::choices_selected()) object available choices preselected option AEOUT variable dataname. action (teal.transform::choices_selected()) object available choices preselected option AEACN variable dataname. time (teal.transform::choices_selected()) object available choices preselected option ASTDY variable dataname. decod (teal.transform::choices_selected()) object available choices preselected option AEDECOD variable dataname. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_adverse_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_adverse_events.html","id":"decorating-modules","dir":"Reference","previous_headings":"","what":"Decorating Modules","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"module generates following objects, can modified place using decorators:: plot (ggplot2) table (listing_df - output rlistings::as_listing) Decorators can applied outputs specific objects using named list teal_transform_module objects. \"default\" name reserved decorators applied outputs. See code snippet : additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":"tm_g_pp_adverse_events( ..., # arguments for module decorators = list( default = list(teal_transform_module(...)), # applied to all outputs plot = list(teal_transform_module(...)), # applied only to `plot` output table = list(teal_transform_module(...)) # applied only to `table` output ) )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_adverse_events.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_adverse_events.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADAE <- tmc_ex_adae ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADAE$USUBJID) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_g_pp_adverse_events( label = \"Adverse Events\", dataname = \"ADAE\", parentname = \"ADSL\", patient_col = \"USUBJID\", plot_height = c(600L, 200L, 2000L), aeterm = choices_selected( choices = variable_choices(ADAE, \"AETERM\"), selected = \"AETERM\" ), tox_grade = choices_selected( choices = variable_choices(ADAE, \"AETOXGR\"), selected = \"AETOXGR\" ), causality = choices_selected( choices = variable_choices(ADAE, \"AEREL\"), selected = \"AEREL\" ), outcome = choices_selected( choices = variable_choices(ADAE, \"AEOUT\"), selected = \"AEOUT\" ), action = choices_selected( choices = variable_choices(ADAE, \"AEACN\"), selected = \"AEACN\" ), time = choices_selected( choices = variable_choices(ADAE, \"ASTDY\"), selected = \"ASTDY\" ), decod = NULL ) ) ) #> Initializing tm_g_pp_adverse_events #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_patient_timeline.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"module produces patient profile timeline ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_patient_timeline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"","code":"tm_g_pp_patient_timeline( label, dataname_adcm = \"ADCM\", dataname_adae = \"ADAE\", parentname = \"ADSL\", patient_col = \"USUBJID\", aeterm = NULL, cmdecod = NULL, aetime_start = NULL, aetime_end = NULL, dstime_start = NULL, dstime_end = NULL, aerelday_start = NULL, aerelday_end = NULL, dsrelday_start = NULL, dsrelday_end = 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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_patient_timeline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"label (character) menu item label module teal app. dataname_adcm (character) name ADCM dataset equivalent. dataname_adae (character) name ADAE dataset equivalent. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. aeterm (teal.transform::choices_selected()) object available choices preselected option AETERM variable dataname. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname_adcm. aetime_start (teal.transform::choices_selected()) object available choices preselected option ASTDTM variable dataname_adae. aetime_end (teal.transform::choices_selected()) object available choices preselected option AENDTM variable dataname_adae. dstime_start (teal.transform::choices_selected()) object available choices preselected option CMASTDTM variable dataname_adcm. dstime_end (teal.transform::choices_selected()) object available choices preselected option CMAENDTM variable dataname_adcm. aerelday_start (teal.transform::choices_selected()) object available choices preselected option ASTDY variable dataname_adae. aerelday_end (teal.transform::choices_selected()) object available choices preselected option AENDY variable dataname_adae. dsrelday_start (teal.transform::choices_selected()) object available choices preselected option ASTDY variable dataname_adcm. dsrelday_end (teal.transform::choices_selected()) object available choices preselected option AENDY variable dataname_adcm. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_patient_timeline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_patient_timeline.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_patient_timeline.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_patient_timeline.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADAE <- tmc_ex_adae ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADAE$USUBJID) ADCM <- tmc_ex_adcm %>% mutate( CMSTDY = case_when( CMCAT == \"medcl B\" ~ 20, CMCAT == \"medcl C\" ~ 150, TRUE ~ 1 ) %>% with_label(\"Study Day of Start of Medication\"), CMENDY = case_when( CMCAT == \"medcl B\" ~ 700, CMCAT == \"medcl C\" ~ 1000, TRUE ~ 500 ) %>% with_label(\"Study Day of End of Medication\"), CMASTDTM = ASTDTM, CMAENDTM = AENDTM ) }) join_keys(data) <- default_cdisc_join_keys[c(\"ADSL\", \"ADAE\", \"ADCM\")] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys join_keys(data)[\"ADAE\", \"ADCM\"] <- c(\"STUDYID\", \"USUBJID\") app <- init( data = data, modules = modules( tm_g_pp_patient_timeline( label = \"Patient Timeline\", dataname_adae = \"ADAE\", dataname_adcm = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", plot_height = c(600L, 200L, 2000L), cmdecod = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"CMDECOD\"), selected = \"CMDECOD\", ), aeterm = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"AETERM\"), selected = c(\"AETERM\") ), aetime_start = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"ASTDTM\"), selected = c(\"ASTDTM\") ), aetime_end = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"AENDTM\"), selected = c(\"AENDTM\") ), dstime_start = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"CMASTDTM\"), selected = c(\"CMASTDTM\") ), dstime_end = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"CMAENDTM\"), selected = c(\"CMAENDTM\") ), aerelday_start = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"ASTDY\"), selected = c(\"ASTDY\") ), aerelday_end = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"AENDY\"), selected = c(\"AENDY\") ), dsrelday_start = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"ASTDY\"), selected = c(\"ASTDY\") ), dsrelday_end = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"AENDY\"), selected = c(\"AENDY\") ) ) ) ) #> Initializing tm_g_pp_patient_timeline #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_therapy.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"module produces patient profile therapy table ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_therapy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"","code":"tm_g_pp_therapy( label, dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", atirel = NULL, cmdecod = NULL, cmindc = NULL, cmdose = NULL, cmtrt = NULL, cmdosu = NULL, cmroute = NULL, cmdosfrq = NULL, cmstdy = NULL, cmendy = 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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_therapy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. atirel (teal.transform::choices_selected()) object available choices preselected option ATIREL variable dataname. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname. cmindc (teal.transform::choices_selected()) object available choices preselected option CMINDC variable dataname. cmdose (teal.transform::choices_selected()) object available choices preselected option CMDOSE variable dataname. cmtrt (teal.transform::choices_selected()) object available choices preselected option CMTRT variable dataname. cmdosu (teal.transform::choices_selected()) object available choices preselected option CMDOSU variable dataname. cmroute (teal.transform::choices_selected()) object available choices preselected option CMROUTE variable dataname. cmdosfrq (teal.transform::choices_selected()) object available choices preselected option CMDOSFRQ variable dataname. cmstdy (teal.transform::choices_selected()) object available choices preselected option CMSTDY variable dataname. cmendy (teal.transform::choices_selected()) object available choices preselected option CMENDY variable dataname. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_therapy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_therapy.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"module generates following objects, can modified place using decorators:: plot (ggplot2) table (listing_df - output rlistings::as_listing) Decorators can applied outputs specific objects using named list teal_transform_module objects. \"default\" name reserved decorators applied outputs. See code snippet : additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":"tm_g_pp_therapy( ..., # arguments for module decorators = list( default = list(teal_transform_module(...)), # applied to all outputs plot = list(teal_transform_module(...)), # applied only to `plot` output table = list(teal_transform_module(...)) # applied only to `table` output ) )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_therapy.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_therapy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADCM <- tmc_ex_adcm ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADCM$USUBJID) ADCM$CMASTDTM <- ADCM$ASTDTM ADCM$CMAENDTM <- ADCM$AENDTM }) join_keys(data) <- default_cdisc_join_keys[c(\"ADSL\", \"ADCM\")] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys ADSL <- data[[\"ADSL\"]] ADCM <- data[[\"ADCM\"]] app <- init( data = data, modules = modules( tm_g_pp_therapy( label = \"Therapy\", dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", plot_height = c(600L, 200L, 2000L), atirel = choices_selected( choices = variable_choices(ADCM, \"ATIREL\"), selected = c(\"ATIREL\") ), cmdecod = choices_selected( choices = variable_choices(ADCM, \"CMDECOD\"), selected = \"CMDECOD\" ), cmindc = choices_selected( choices = variable_choices(ADCM, \"CMINDC\"), selected = \"CMINDC\" ), cmdose = choices_selected( choices = variable_choices(ADCM, \"CMDOSE\"), selected = \"CMDOSE\" ), cmtrt = choices_selected( choices = variable_choices(ADCM, \"CMTRT\"), selected = \"CMTRT\" ), cmdosu = choices_selected( choices = variable_choices(ADCM, \"CMDOSU\"), selected = c(\"CMDOSU\") ), cmroute = choices_selected( choices = variable_choices(ADCM, \"CMROUTE\"), selected = \"CMROUTE\" ), cmdosfrq = choices_selected( choices = variable_choices(ADCM, \"CMDOSFRQ\"), selected = \"CMDOSFRQ\" ), cmstdy = choices_selected( choices = variable_choices(ADCM, \"ASTDY\"), selected = \"ASTDY\" ), cmendy = choices_selected( choices = variable_choices(ADCM, \"AENDY\"), selected = \"AENDY\" ) ) ) ) #> Initializing tm_g_pp_therapy #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"module produces patient profile vitals ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"","code":"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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval Please use aval_var argument instead. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. xaxis (teal.transform::choices_selected()) object available choices preselected option time variable dataname put plot x-axis. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"plot supports horizontal lines following 6 PARAMCD levels present dataname: \"SYSBP\", \"DIABP\", \"TEMP\", \"RESP\", \"OXYSAT\".","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_g_pp_vitals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"","code":"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\" ) ) ) ) #> Initializing tm_g_pp_vitals #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Abnormality Summary Table — tm_t_abnormality","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"module produces table summarize abnormality.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"","code":"tm_t_abnormality( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, by_vars, grade, abnormal = list(low = c(\"LOW\", \"LOW LOW\"), high = c(\"HIGH\", \"HIGH HIGH\")), id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), baseline_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"BNRIND\"), selected = \"BNRIND\", fixed = TRUE), treatment_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"ONTRTFL\"), selected = \"ONTRTFL\", fixed = TRUE), treatment_flag = teal.transform::choices_selected(\"Y\"), add_total = TRUE, total_label = default_total_label(), exclude_base_abn = FALSE, drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. by_vars (teal.transform::choices_selected()) object available choices preselected option variable names used split summary rows. grade (teal.transform::choices_selected()) object available choices preselected option variable names can used specify abnormality grade. Variable must factor. abnormal (named list) defined user indicate abnormalities displayed. id_var (teal.transform::choices_selected()) object specifying variable name subject id. baseline_var (teal.transform::choices_selected()) variable baseline abnormality grade. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). exclude_base_abn (logical) whether exclude patients abnormal values baseline. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. na_level (character) NA level input dataset, default \"\". basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"Patients abnormality baseline treatment visit can excluded accordance GDSR specifications using exclude_base_abn.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb %>% mutate( ONTRTFL = case_when( AVISIT %in% c(\"SCREENING\", \"BASELINE\") ~ \"\", TRUE ~ \"Y\" ) %>% with_label(\"On Treatment Record Flag\") ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_abnormality( label = \"Abnormality Table\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), add_total = FALSE, by_vars = choices_selected( choices = variable_choices(ADLB, subset = c(\"LBCAT\", \"PARAM\", \"AVISIT\")), selected = c(\"LBCAT\", \"PARAM\"), keep_order = TRUE ), baseline_var = choices_selected( variable_choices(ADLB, subset = \"BNRIND\"), selected = \"BNRIND\", fixed = TRUE ), grade = choices_selected( choices = variable_choices(ADLB, subset = \"ANRIND\"), selected = \"ANRIND\", fixed = TRUE ), abnormal = list(low = \"LOW\", high = \"HIGH\"), exclude_base_abn = FALSE ) ) ) #> Initializing tm_t_abnormality #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality_by_worst_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"module produces table summarize laboratory test results highest grade post-baseline","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality_by_worst_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"","code":"tm_t_abnormality_by_worst_grade( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), paramcd, atoxgr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"ATOXGR\"), selected = \"ATOXGR\", fixed = TRUE), worst_high_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"WGRHIFL\"), selected = \"WGRHIFL\", fixed = TRUE), worst_low_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"WGRLOFL\"), selected = \"WGRLOFL\", fixed = TRUE), worst_flag_indicator = teal.transform::choices_selected(\"Y\"), add_total = TRUE, total_label = default_total_label(), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality_by_worst_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. id_var (teal.transform::choices_selected()) object specifying variable name subject id. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. atoxgr_var (teal.transform::choices_selected()) object available choices preselected option variable names can used Analysis Toxicity Grade. worst_high_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used Worst High Grade flag. worst_low_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used Worst Low Grade flag. worst_flag_indicator (teal.transform::choices_selected()) value indicating worst grade. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality_by_worst_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality_by_worst_grade.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality_by_worst_grade.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_abnormality_by_worst_grade.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb %>% filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\")) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_abnormality_by_worst_grade( label = \"Laboratory Test Results with Highest Grade Post-Baseline\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( choices = value_choices(ADLB, \"PARAMCD\", \"PARAM\"), selected = c(\"ALT\", \"CRP\", \"IGA\") ), add_total = FALSE ) ), filter = teal_slices( teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"), teal_slice(\"ADLB\", \"ONTRTFL\", selected = \"Y\") ) ) #> Initializing tm_t_abnormality_by_worst_grade #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: ANCOVA Summary — tm_t_ancova","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"module produces table summarize analysis variance, consistent TLG Catalog template AOVT01 available multiple endpoints selected.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"","code":"tm_t_ancova( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, aval_var, cov_var, include_interact = FALSE, interact_var = NULL, interact_y = FALSE, avisit, paramcd, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. include_interact (logical) whether interaction term included model. interact_var (character) name variable interactions arm. interaction needed, default option NULL. interact_y (character) selected item interact_var column used select specific ANCOVA results interact_var discrete. interaction needed, default option FALSE. avisit (teal.transform::choices_selected()) value analysis visit AVISIT interest. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"single endpoint selected, unadjusted adjusted comparison provided. modules expects analysis data following variables: AVISIT: variable used filter analysis visits. PARAMCD: variable used filter endpoints, filtering paramcd avisit, one observation per patient expected analysis meaningful.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_ancova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADQS <- tmc_ex_adqs }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADQS <- data[[\"ADQS\"]] arm_ref_comp <- list( ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ), ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) app <- init( data = data, modules = modules( tm_t_ancova( label = \"ANCOVA Table\", dataname = \"ADQS\", avisit = choices_selected( choices = value_choices(ADQS, \"AVISIT\"), selected = \"WEEK 1 DAY 8\" ), arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ACTARMCD\", \"ARMCD\")), selected = \"ARMCD\" ), arm_ref_comp = arm_ref_comp, aval_var = choices_selected( choices = variable_choices(ADQS, c(\"CHG\", \"AVAL\")), selected = \"CHG\" ), cov_var = choices_selected( choices = variable_choices(ADQS, c(\"BASE\", \"STRATA1\", \"SEX\")), selected = \"STRATA1\" ), paramcd = choices_selected( choices = value_choices(ADQS, \"PARAMCD\", \"PARAM\"), selected = \"FKSI-FWB\" ), interact_var = choices_selected( choices = variable_choices(ADQS, c(\"BASE\", \"STRATA1\", \"SEX\")), selected = \"STRATA1\" ) ) ) ) #> Initializing tm_t_ancova #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Binary Outcome Table — tm_t_binary_outcome","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"module produces binary outcome response summary table, option match template response table RSPT01 available TLG Catalog .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"","code":"tm_t_binary_outcome( label, dataname, parentname = ifelse(test = inherits(arm_var, \"data_extract_spec\"), yes = teal.transform::datanames_input(arm_var), no = \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, strata_var, aval_var = teal.transform::choices_selected(choices = teal.transform::variable_choices(dataname, c(\"AVALC\", \"SEX\")), selected = \"AVALC\", fixed = FALSE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), default_responses = c(\"CR\", \"PR\", \"Y\", \"Complete Response (CR)\", \"Partial Response (PR)\", \"M\"), rsp_table = FALSE, control = list(global = list(method = ifelse(rsp_table, \"clopper-pearson\", \"waldcc\"), conf_level = 0.95), unstrat = list(method_ci = ifelse(rsp_table, \"wald\", \"waldcc\"), method_test = \"schouten\", odds = TRUE), strat = list(method_ci = \"cmh\", method_test = \"cmh\")), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). default_responses (list character) defines default codes response variable module per value paramcd. passed vector transmitted paramcd values. passed list must named contain arrays, name corresponding single value paramcd. array may contain default response values named arrays rsp default selected response values levels default level choices. rsp_table (logical) whether initial set-module match RSPT01. Defaults FALSE. control (named list) named list containing 3 named lists follows: global: list settings overall analysis 2 named elements method conf_level. unstrat: list settings unstratified analysis 3 named elements method_ci method_test, odds. See tern::estimate_proportion_diff(), tern::test_proportion_diff(), tern::estimate_odds_ratio(), respectively, options details settings implemented analysis. strat: list settings stratified analysis elements method_ci method_test. See tern::estimate_proportion_diff() tern::test_proportion_diff(), respectively, options details settings implemented analysis. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"display order response categories inherits factor level order source data. Use base::factor() levels argument manipulate source data order include/exclude re-categorize response categories arrange display order. response categories \"Missing\", \"Evaluable (NE)\", \"Missing unevaluable\", 95% confidence interval calculated. Reference arms automatically combined multiple arms selected reference group.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_binary_outcome.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADRS <- tmc_ex_adrs %>% mutate( AVALC = d_onco_rsp_label(AVALC) %>% with_label(\"Character Result/Finding\") ) %>% filter(PARAMCD != \"OVRINV\" | AVISIT == \"FOLLOW UP\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADRS <- data[[\"ADRS\"]] arm_ref_comp <- list( ARMCD = list(ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\")), ARM = list(ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\")) ) app <- init( data = data, modules = modules( tm_t_binary_outcome( label = \"Responders\", dataname = \"ADRS\", paramcd = choices_selected( choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"), selected = \"BESRSPI\" ), arm_var = choices_selected( choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), selected = \"ARM\" ), arm_ref_comp = arm_ref_comp, strata_var = choices_selected( choices = variable_choices(ADRS, c(\"SEX\", \"BMRKR2\", \"RACE\")), selected = \"RACE\" ), default_responses = list( BESRSPI = list( rsp = c(\"Complete Response (CR)\", \"Partial Response (PR)\"), levels = c( \"Complete Response (CR)\", \"Partial Response (PR)\", \"Stable Disease (SD)\", \"Progressive Disease (PD)\" ) ), INVET = list( rsp = c(\"Stable Disease (SD)\", \"Not Evaluable (NE)\"), levels = c( \"Complete Response (CR)\", \"Not Evaluable (NE)\", \"Partial Response (PR)\", \"Progressive Disease (PD)\", \"Stable Disease (SD)\" ) ), OVRINV = list( rsp = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\"), levels = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\", \"Not Evaluable (NE)\") ) ) ) ) ) #> Initializing tm_t_binary_outcome #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Cox Regression Model — tm_t_coxreg","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"module fits Cox univariable multi-variable models, consistent TLG Catalog templates Cox regression tables COXT01 COXT02, respectively. See TLG Catalog entries COXT01 COXT02 .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"","code":"tm_t_coxreg( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, cov_var, strata_var, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), multivariate = TRUE, na_level = default_na_str(), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. multivariate (logical) FALSE, univariable approach used instead multi-variable model. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"Cox Proportional Hazards (PH) model commonly used method estimate magnitude effect survival analysis. assumes proportional hazards: ratio hazards groups (e.g., two arms) constant time. ratio referred \"hazard ratio\" (HR) one commonly reported metrics describe effect size survival analysis. modules expects analysis data following variables: AVAL: time event CNSR: 1 record AVAL censored, 0 otherwise PARAMCD: variable used filter endpoint (e.g. OS). filtering PARAMCD one observation per patient expected arm variables stratification/covariate variables taken ADSL data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"likelihood ratio test supported models include strata - Wald test substituted cases. Multi-variable default choice backward compatibility.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"example-1 Open Shinylive example-2 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_coxreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"","code":"## First example ## ============= ## The example below is based on the usual approach involving creation of ## a random CDISC dataset and then running the application. arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] app <- init( data = data, modules = modules( tm_t_coxreg( label = \"Cox Reg.\", dataname = \"ADTTE\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"ACTARMCD\"), \"ARM\"), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), strata_var = choices_selected( c(\"COUNTRY\", \"STRATA1\", \"STRATA2\"), \"STRATA1\" ), cov_var = choices_selected( c(\"AGE\", \"BMRKR1\", \"BMRKR2\", \"REGION1\"), \"AGE\" ), multivariate = TRUE ) ) ) #> Initializing tm_t_coxreg #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) } ## Second example ## ============== ## This time, a synthetic pair of ADTTE/ADSL data is fabricated for Cox regression ## where ties and pval_method matter. library(dplyr) data <- teal_data() data <- within(data, { ADTTE <- data.frame( STUDYID = \"LUNG\", AVAL = c(4, 3, 1, 1, 2, 2, 3, 1, 2), CNSR = c(1, 1, 1, 0, 1, 1, 0, 0, 0), ARMCD = factor( c(0, 1, 1, 1, 1, 0, 0, 0, 0), labels = c(\"ARM A\", \"ARM B\") ), SEX = factor( c(0, 0, 0, 0, 1, 1, 1, 1, 1), labels = c(\"F\", \"M\") ), INST = factor(c(\"A\", \"A\", \"B\", \"B\", \"A\", \"B\", \"A\", \"B\", \"A\")), stringsAsFactors = FALSE ) ADTTE <- rbind(ADTTE, ADTTE, ADTTE, ADTTE) ADTTE <- as_tibble(ADTTE) set.seed(1) ADTTE$INST <- sample(ADTTE$INST) ADTTE$AGE <- sample(seq(5, 75, 5), size = nrow(ADTTE), replace = TRUE) ADTTE$USUBJID <- paste(\"sub\", 1:nrow(ADTTE), ADTTE$INST, sep = \"-\") ADTTE$PARAM <- ADTTE$PARAMCD <- \"OS\" ADSL <- subset( ADTTE, select = c(\"USUBJID\", \"STUDYID\", \"ARMCD\", \"SEX\", \"INST\", \"AGE\") ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] ## `teal` application ## ---------------- ## Note that the R code exported by `Show R Code` does not include the data ## pre-processing. You will need to create the dataset as above before ## running the exported R code. arm_ref_comp <- list(ARMCD = list(ref = \"ARM A\", comp = c(\"ARM B\"))) app <- init( data = data, modules = modules( tm_t_coxreg( label = \"Cox Reg.\", dataname = \"ADTTE\", arm_var = choices_selected(c(\"ARMCD\"), \"ARMCD\"), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), strata_var = choices_selected(c(\"INST\"), NULL), cov_var = choices_selected(c(\"SEX\", \"AGE\"), \"SEX\"), multivariate = TRUE ) ) ) #> Initializing tm_t_coxreg #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Events by Term — tm_t_events","title":"teal Module: Events by Term — tm_t_events","text":"module produces table events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Events by Term — tm_t_events","text":"","code":"tm_t_events( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, hlt, llt, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", sort_criteria = c(\"freq_desc\", \"alpha\"), sort_freq_col = total_label, prune_freq = 0, prune_diff = 0, drop_arm_levels = TRUE, incl_overall_sum = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Events by Term — tm_t_events","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. hlt (teal.transform::choices_selected()) name variable high level term events. llt (teal.transform::choices_selected()) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. sort_freq_col (character) column sort frequency sort_criteria set freq_desc. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. incl_overall_sum (flag) whether two rows summarize overall number adverse events included top table. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Events by Term — tm_t_events","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Events by Term — tm_t_events","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Events by Term — tm_t_events","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Events by Term — tm_t_events","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_t_events( label = \"Adverse Event Table\", dataname = \"ADAE\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), llt = choices_selected( choices = variable_choices(ADAE, c(\"AETERM\", \"AEDECOD\")), selected = c(\"AEDECOD\") ), hlt = choices_selected( choices = variable_choices(ADAE, c(\"AEBODSYS\", \"AESOC\")), selected = \"AEBODSYS\" ), add_total = TRUE, event_type = \"adverse event\" ) ) ) #> Initializing tm_t_events #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Events by Grade — tm_t_events_by_grade","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"module produces table summarize events grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"","code":"tm_t_events_by_grade( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, hlt, llt, grade, grading_groups = list(`Any Grade (%)` = c(\"1\", \"2\", \"3\", \"4\", \"5\"), `Grade 1-2 (%)` = c(\"1\", \"2\"), `Grade 3-4 (%)` = c(\"3\", \"4\"), `Grade 5 (%)` = \"5\"), col_by_grade = FALSE, prune_freq = 0, prune_diff = 0, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. hlt (teal.transform::choices_selected()) name variable high level term events. llt (teal.transform::choices_selected()) name variable low level term events. grade (character) name severity level variable. grading_groups (list) named list grading groups used col_by_grade = TRUE. col_by_grade (logical) whether display grading groups nested columns. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_by_grade.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_by_grade.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_by_grade.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl .lbls_adae <- col_labels(tmc_ex_adae) ADAE <- tmc_ex_adae %>% mutate_if(is.character, as.factor) #' be certain of having factors col_labels(ADAE) <- .lbls_adae }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_t_events_by_grade( label = \"Adverse Events by Grade Table\", dataname = \"ADAE\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), llt = choices_selected( choices = variable_choices(ADAE, c(\"AETERM\", \"AEDECOD\")), selected = c(\"AEDECOD\") ), hlt = choices_selected( choices = variable_choices(ADAE, c(\"AEBODSYS\", \"AESOC\")), selected = \"AEBODSYS\" ), grade = choices_selected( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\")), selected = \"AETOXGR\" ) ) ) ) #> Initializing tm_t_events_by_grade #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_patyear.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"module produces table event rates adjusted patient-years.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_patyear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"","code":"tm_t_events_patyear( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, events_var, paramcd, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), avalu_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_patyear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. events_var (teal.transform::choices_selected()) object available choices preselected option variable event counts. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_patyear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_patyear.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_patyear.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"example-1 Open Shinylive example-2 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_patyear.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADAETTE <- tmc_ex_adaette %>% filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>% mutate(is_event = CNSR == 0) %>% mutate(n_events = as.integer(is_event)) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAETTE <- data[[\"ADAETTE\"]] # 1. Basic Example app <- init( data = data, modules = modules( tm_t_events_patyear( label = \"AE Rate Adjusted for Patient-Years At Risk Table\", dataname = \"ADAETTE\", arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), selected = \"ARMCD\" ), add_total = TRUE, events_var = choices_selected( choices = variable_choices(ADAETTE, \"n_events\"), selected = \"n_events\", fixed = TRUE ), paramcd = choices_selected( choices = value_choices(ADAETTE, \"PARAMCD\", \"PARAM\"), selected = \"AETTE1\" ) ) ) ) #> Initializing tm_t_events_patyear #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) } # 2. Example with table split on 2 arm_var variables app <- init( data = data, modules = modules( tm_t_events_patyear( label = \"AE Rate Adjusted for Patient-Years At Risk Table\", dataname = \"ADAETTE\", arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"SEX\")), selected = c(\"ARM\", \"SEX\") ), add_total = TRUE, events_var = choices_selected( choices = variable_choices(ADAETTE, \"n_events\"), selected = \"n_events\", fixed = TRUE ), paramcd = choices_selected( choices = value_choices(ADAETTE, \"PARAMCD\", \"PARAM\"), selected = \"AETTE1\" ) ) ) ) #> Initializing tm_t_events_patyear #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Adverse Events Summary — tm_t_events_summary","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"module produces adverse events summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"","code":"tm_t_events_summary( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, flag_var_anl = NULL, flag_var_aesi = NULL, dthfl_var = teal.transform::choices_selected(teal.transform::variable_choices(parentname, \"DTHFL\"), \"DTHFL\", fixed = TRUE), dcsreas_var = teal.transform::choices_selected(teal.transform::variable_choices(parentname, \"DCSREAS\"), \"DCSREAS\", fixed = TRUE), llt = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AEDECOD\"), \"AEDECOD\", fixed = TRUE), aeseq_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AESEQ\"), \"AESEQ\", fixed = TRUE), add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), count_dth = TRUE, count_wd = TRUE, count_subj = TRUE, count_pt = TRUE, count_events = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. flag_var_anl (teal.transform::choices_selected() NULL) vector names flag variables dataset used count adverse event sub-groups (e.g. Serious events, Related events, etc.). Variable labels used table row names exist. flag_var_aesi (teal.transform::choices_selected() NULL) vector names flag variables dataset used count adverse event special interest groups. flag variables must type logical. Variable labels used table row names exist. dthfl_var (teal.transform::choices_selected()) object available choices preselected option variable names can used death flag variable. Records `\"Y\"“ summarized table row \"Total number deaths\". dcsreas_var (teal.transform::choices_selected()) object available choices preselected option variable names can used study discontinuation reason variable. Records \"ADVERSE EVENTS\" summarized table row \"Total number patients withdrawn study due AE\". llt (teal.transform::choices_selected()) name variable low level term events. aeseq_var (teal.transform::choices_selected()) variable adverse events sequence number dataset. Used counting total number events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). count_dth (logical) whether show count total deaths (based dthfl_var). Defaults TRUE. count_wd (logical) whether show count patients withdrawn study due adverse event (based dcsreas_var). Defaults TRUE. count_subj (logical) whether show count unique subjects (based USUBJID). applies event flag variables provided. count_pt (logical) whether show count unique preferred terms (based llt). applies event flag variables provided. count_events (logical) whether show count events (based aeseq_var). applies event flag variables provided. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_summary.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_summary.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_events_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl %>% mutate( DTHFL = case_when( !is.na(DTHDT) ~ \"Y\", TRUE ~ \"\" ) %>% with_label(\"Subject Death Flag\") ) ADAE <- tmc_ex_adae .add_event_flags <- function(dat) { dat <- dat %>% mutate( TMPFL_SER = AESER == \"Y\", TMPFL_REL = AEREL == \"Y\", TMPFL_GR5 = AETOXGR == \"5\", TMP_SMQ01 = !is.na(SMQ01NAM), TMP_SMQ02 = !is.na(SMQ02NAM), TMP_CQ01 = !is.na(CQ01NAM) ) column_labels <- list( TMPFL_SER = \"Serious AE\", TMPFL_REL = \"Related AE\", TMPFL_GR5 = \"Grade 5 AE\", TMP_SMQ01 = aesi_label(dat[[\"SMQ01NAM\"]], dat[[\"SMQ01SC\"]]), TMP_SMQ02 = aesi_label(\"Y.9.9.9.9/Z.9.9.9.9 AESI\"), TMP_CQ01 = aesi_label(dat[[\"CQ01NAM\"]]) ) col_labels(dat)[names(column_labels)] <- as.character(column_labels) dat } #' Generating user-defined event flags. ADAE <- ADAE %>% .add_event_flags() .ae_anl_vars <- names(ADAE)[startsWith(names(ADAE), \"TMPFL_\")] .aesi_vars <- names(ADAE)[startsWith(names(ADAE), \"TMP_\")] }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_t_events_summary( label = \"Adverse Events Summary\", dataname = \"ADAE\", arm_var = choices_selected( choices = variable_choices(\"ADSL\", c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), flag_var_anl = choices_selected( choices = variable_choices(\"ADAE\", data[[\".ae_anl_vars\"]]), selected = data[[\".ae_anl_vars\"]][1], keep_order = TRUE, fixed = FALSE ), flag_var_aesi = choices_selected( choices = variable_choices(\"ADAE\", data[[\".aesi_vars\"]]), selected = data[[\".aesi_vars\"]][1], keep_order = TRUE, fixed = FALSE ), add_total = TRUE ) ) ) #> Initializing tm_t_events_summary #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_exposure.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"module produces exposure table risk management plan.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_exposure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"","code":"tm_t_exposure( label, dataname, parentname = ifelse(inherits(col_by_var, \"data_extract_spec\"), teal.transform::datanames_input(col_by_var), \"ADSL\"), row_by_var, col_by_var, paramcd = teal.transform::choices_selected(choices = teal.transform::value_choices(dataname, \"PARAMCD\", \"PARAM\"), selected = \"TDURD\"), paramcd_label = \"PARAM\", id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), parcat, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"AVAL\"), selected = \"AVAL\", fixed = TRUE), avalu_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"AVALU\"), selected = \"AVALU\", fixed = TRUE), add_total, total_label = default_total_label(), add_total_row = TRUE, total_row_label = \"Total number of patients and patient time*\", na_level = default_na_str(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_exposure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. row_by_var (teal.transform::choices_selected()) object available choices preselected option variable names can used split rows. col_by_var (teal.transform::choices_selected()) object available choices preselected option variable names can used split columns. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. paramcd_label (character) column dataset value used label argument paramcd. id_var (teal.transform::choices_selected()) object specifying variable name subject id. parcat (teal.transform::choices_selected()) object available choices preselected option parameter category values. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). add_total_row (flag) whether \"total\" level added others includes levels constitute split. custom label can set level via total_row_label argument. total_row_label (character) string display total row label row enabled (see add_total_row). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_exposure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_exposure.html","id":"decorating-modules","dir":"Reference","previous_headings":"","what":"Decorating Modules","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_exposure.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_exposure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADEX <- tmc_ex_adex set.seed(1, kind = \"Mersenne-Twister\") .labels <- col_labels(ADEX, fill = FALSE) ADEX <- ADEX %>% distinct(USUBJID, .keep_all = TRUE) %>% mutate( PARAMCD = \"TDURD\", PARAM = \"Overall duration (days)\", AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE), AVALU = \"Days\" ) %>% bind_rows(ADEX) col_labels(ADEX) <- .labels }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_t_exposure( label = \"Duration of Exposure Table\", dataname = \"ADEX\", paramcd = choices_selected( choices = value_choices(data[[\"ADEX\"]], \"PARAMCD\", \"PARAM\"), selected = \"TDURD\" ), col_by_var = choices_selected( choices = variable_choices(data[[\"ADEX\"]], subset = c(\"SEX\", \"ARM\")), selected = \"SEX\" ), row_by_var = choices_selected( choices = variable_choices(data[[\"ADEX\"]], subset = c(\"RACE\", \"REGION1\", \"STRATA1\", \"SEX\")), selected = \"RACE\" ), parcat = choices_selected( choices = value_choices(data[[\"ADEX\"]], \"PARCAT2\"), selected = \"Drug A\" ), add_total = FALSE ) ), filter = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\")) ) #> Initializing tm_t_exposure #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Logistic Regression — tm_t_logistic","title":"teal Module: Logistic Regression — tm_t_logistic","text":"module produces multi-variable logistic regression table consistent TLG Catalog template LGRT02 available .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Logistic Regression — tm_t_logistic","text":"","code":"tm_t_logistic( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var = NULL, arm_ref_comp = NULL, paramcd, cov_var = NULL, avalc_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALC\"), \"AVALC\", fixed = TRUE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Logistic Regression — tm_t_logistic","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected() NULL) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. NULL, arm/treatment variable included logistic model. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. avalc_var (teal.transform::choices_selected()) object available choices preselected option analysis variable (categorical). conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Logistic Regression — tm_t_logistic","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_logistic.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Logistic Regression — tm_t_logistic","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_logistic.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Logistic Regression — tm_t_logistic","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_logistic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Logistic Regression — tm_t_logistic","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADRS <- tmc_ex_adrs %>% filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\")) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADRS <- data[[\"ADRS\"]] arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) app <- init( data = data, modules = modules( tm_t_logistic( label = \"Logistic Regression\", dataname = \"ADRS\", arm_var = choices_selected( choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"), selected = \"BESRSPI\" ), cov_var = choices_selected( choices = c(\"SEX\", \"AGE\", \"BMRKR1\", \"BMRKR2\"), selected = \"SEX\" ) ) ) ) #> Initializing tm_t_logistic #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_mult_events.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Multiple Events by Term — tm_t_mult_events","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"module produces table multiple events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_mult_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"","code":"tm_t_mult_events( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, seq_var, hlt, llt, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_mult_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. seq_var (teal.transform::choices_selected()) object available choices preselected option variable names can used analysis sequence number variable. Used counting unique number events. hlt (teal.transform::choices_selected()) name variable high level term events. llt (teal.transform::choices_selected()) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_mult_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_mult_events.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_mult_events.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_mult_events.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADCM <- tmc_ex_adcm }) join_keys(data) <- default_cdisc_join_keys[names(data)] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys ADSL <- data[[\"ADSL\"]] ADCM <- data[[\"ADCM\"]] app <- init( data = data, modules = modules( tm_t_mult_events( label = \"Concomitant Medications by Medication Class and Preferred Name\", dataname = \"ADCM\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE), hlt = choices_selected( choices = variable_choices(ADCM, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")), selected = c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") ), llt = choices_selected( choices = variable_choices(ADCM, c(\"CMDECOD\")), selected = c(\"CMDECOD\") ), add_total = TRUE, event_type = \"treatment\" ) ) ) #> Initializing tm_t_mult_events #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_basic_info.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"module produces patient profile basic info report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_basic_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"","code":"tm_t_pp_basic_info( label, dataname = \"ADSL\", patient_col = \"USUBJID\", vars = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_basic_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. patient_col (character) name patient ID variable. vars (teal.transform::choices_selected()) object available choices preselected option variables dataname show table. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_basic_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_basic_info.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"module generates following objects, can modified place using decorators: table (listing_df - output rlistings::as_listing) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_basic_info.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_basic_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] app <- init( data = data, modules = modules( tm_t_pp_basic_info( label = \"Basic Info\", dataname = \"ADSL\", patient_col = \"USUBJID\", vars = choices_selected( choices = variable_choices(ADSL), selected = c(\"ARM\", \"AGE\", \"SEX\", \"COUNTRY\", \"RACE\", \"EOSSTT\") ) ) ) ) #> Initializing tm_t_pp_basic_info #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_laboratory.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"module produces patient profile laboratory table using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_laboratory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"","code":"tm_t_pp_laboratory( label, dataname = \"ADLB\", parentname = \"ADSL\", patient_col = \"USUBJID\", timepoints = NULL, aval = lifecycle::deprecated(), aval_var = NULL, avalu = lifecycle::deprecated(), avalu_var = NULL, param = NULL, paramcd = NULL, anrind = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_laboratory.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. timepoints (teal.transform::choices_selected()) object available choices preselected option time variable dataname. aval Please use aval_var argument instead. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu Please use avalu_var argument instead. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. param (teal.transform::choices_selected()) object available choices preselected option PARAM variable dataname. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. anrind (teal.transform::choices_selected()) object available choices preselected option ANRIND variable dataname. Variable following 3 levels: \"HIGH\", \"LOW\", \"NORMAL\". pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_laboratory.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_laboratory.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"module generates following objects, can modified place using decorators: table (listing_df - output rlistings::as_listing) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_laboratory.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_laboratory.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_pp_laboratory( label = \"Vitals\", dataname = \"ADLB\", patient_col = \"USUBJID\", paramcd = choices_selected( choices = variable_choices(ADLB, \"PARAMCD\"), selected = \"PARAMCD\" ), param = choices_selected( choices = variable_choices(ADLB, \"PARAM\"), selected = \"PARAM\" ), timepoints = choices_selected( choices = variable_choices(ADLB, \"ADY\"), selected = \"ADY\" ), anrind = choices_selected( choices = variable_choices(ADLB, \"ANRIND\"), selected = \"ANRIND\" ), aval_var = choices_selected( choices = variable_choices(ADLB, \"AVAL\"), selected = \"AVAL\" ), avalu_var = choices_selected( choices = variable_choices(ADLB, \"AVALU\"), selected = \"AVALU\" ) ) ) ) #> Initializing tm_t_pp_laboratory #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_medical_history.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"module produces patient profile medical history report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_medical_history.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"","code":"tm_t_pp_medical_history( label, dataname = \"ADMH\", parentname = \"ADSL\", patient_col = \"USUBJID\", mhterm = NULL, mhbodsys = NULL, mhdistat = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_medical_history.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. mhterm (teal.transform::choices_selected()) object available choices preselected option MHTERM variable dataname. mhbodsys (teal.transform::choices_selected()) object available choices preselected option MHBODSYS variable dataname. mhdistat (teal.transform::choices_selected()) object available choices preselected option MHDISTAT variable dataname. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_medical_history.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_medical_history.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_medical_history.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_medical_history.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADMH <- tmc_ex_admh }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADMH <- data[[\"ADMH\"]] app <- init( data = data, modules = modules( tm_t_pp_medical_history( label = \"Medical History\", dataname = \"ADMH\", parentname = \"ADSL\", patient_col = \"USUBJID\", mhterm = choices_selected( choices = variable_choices(ADMH, c(\"MHTERM\")), selected = \"MHTERM\" ), mhbodsys = choices_selected( choices = variable_choices(ADMH, \"MHBODSYS\"), selected = \"MHBODSYS\" ), mhdistat = choices_selected( choices = variable_choices(ADMH, \"MHDISTAT\"), selected = \"MHDISTAT\" ) ) ) ) #> Initializing tm_t_pp_medical_history #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_prior_medication.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"module produces patient profile prior medication report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_prior_medication.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"","code":"tm_t_pp_prior_medication( label, dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", atirel = NULL, cmdecod = NULL, cmindc = NULL, cmstdy = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_prior_medication.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. atirel (teal.transform::choices_selected()) object available choices preselected option ATIREL variable dataname. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname. cmindc (teal.transform::choices_selected()) object available choices preselected option CMINDC variable dataname. cmstdy (teal.transform::choices_selected()) object available choices preselected option CMSTDY variable dataname. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_prior_medication.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_prior_medication.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"module generates following objects, can modified place using decorators: table (listing_df - output rlistings::as_listing) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_prior_medication.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_pp_prior_medication.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADCM <- tmc_ex_adcm ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADCM$USUBJID) ADCM$CMASTDTM <- ADCM$ASTDTM ADCM$CMAENDTM <- ADCM$AENDTM }) join_keys(data) <- default_cdisc_join_keys[names(data)] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys ADSL <- data[[\"ADSL\"]] ADCM <- data[[\"ADCM\"]] app <- init( data = data, modules = modules( tm_t_pp_prior_medication( label = \"Prior Medication\", dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", atirel = choices_selected( choices = variable_choices(ADCM, \"ATIREL\"), selected = \"ATIREL\" ), cmdecod = choices_selected( choices = variable_choices(ADCM, \"CMDECOD\"), selected = \"CMDECOD\" ), cmindc = choices_selected( choices = variable_choices(ADCM, \"CMINDC\"), selected = \"CMINDC\" ), cmstdy = choices_selected( choices = variable_choices(ADCM, \"ASTDY\"), selected = \"ASTDY\" ) ) ) ) #> Initializing tm_t_pp_prior_medication #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Shift by Arm — tm_t_shift_by_arm","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"module produces summary table analysis indicator levels arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"","code":"tm_t_shift_by_arm( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, paramcd, visit_var, aval_var, base_var = lifecycle::deprecated(), baseline_var, treatment_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"ONTRTFL\"), selected = \"ONTRTFL\"), treatment_flag = teal.transform::choices_selected(\"Y\"), useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. base_var Please use baseline_var argument instead. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADEG <- tmc_ex_adeg }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADEG <- data[[\"ADEG\"]] app <- init( data = data, modules = modules( tm_t_shift_by_arm( label = \"Shift by Arm Table\", dataname = \"ADEG\", arm_var = choices_selected( variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( value_choices(ADEG, \"PARAMCD\"), selected = \"HR\" ), visit_var = choices_selected( value_choices(ADEG, \"AVISIT\"), selected = \"POST-BASELINE MINIMUM\" ), aval_var = choices_selected( variable_choices(ADEG, subset = \"ANRIND\"), selected = \"ANRIND\", fixed = TRUE ), baseline_var = choices_selected( variable_choices(ADEG, subset = \"BNRIND\"), selected = \"BNRIND\", fixed = TRUE ), useNA = \"ifany\" ) ) ) #> Initializing tm_t_shift_by_arm #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm_by_worst.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"module produces summary table worst analysis indicator variable level per subject arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm_by_worst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"","code":"tm_t_shift_by_arm_by_worst( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, paramcd, aval_var, base_var = lifecycle::deprecated(), baseline_var, worst_flag_var, worst_flag, treatment_flag_var = teal.transform::choices_selected(choices = teal.transform::variable_choices(dataname, subset = \"ONTRTFL\"), selected = \"ONTRTFL\"), treatment_flag = teal.transform::choices_selected(\"Y\"), useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm_by_worst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. base_var Please use baseline_var argument instead. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. worst_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used worst flag variable. worst_flag (character) value indicating worst analysis indicator level. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm_by_worst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm_by_worst.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm_by_worst.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_arm_by_worst.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADEG <- tmc_ex_adeg }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADEG <- data[[\"ADEG\"]] app <- init( data = data, modules = modules( tm_t_shift_by_arm_by_worst( label = \"Shift by Arm Table\", dataname = \"ADEG\", arm_var = choices_selected( variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( value_choices(ADEG, \"PARAMCD\"), selected = \"ECGINTP\" ), worst_flag_var = choices_selected( variable_choices(ADEG, c(\"WORS02FL\", \"WORS01FL\")), selected = \"WORS02FL\" ), worst_flag = choices_selected( value_choices(ADEG, \"WORS02FL\"), selected = \"Y\", fixed = TRUE ), aval_var = choices_selected( variable_choices(ADEG, c(\"AVALC\", \"ANRIND\")), selected = \"AVALC\" ), baseline_var = choices_selected( variable_choices(ADEG, c(\"BASEC\", \"BNRIND\")), selected = \"BASEC\" ), useNA = \"ifany\" ) ) ) #> Initializing tm_t_shift_by_arm_by_worst #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Grade Summary Table — tm_t_shift_by_grade","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"module produces summary table worst grades per subject visit parameter.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"","code":"tm_t_shift_by_grade( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, visit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"AVISIT\"), selected = \"AVISIT\", fixed = TRUE), paramcd, worst_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")), selected = \"WGRLOVFL\"), worst_flag_indicator = teal.transform::choices_selected(teal.transform::value_choices(dataname, \"WGRLOVFL\"), selected = \"Y\", fixed = TRUE), anl_toxgrade_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = c(\"ATOXGR\")), selected = c(\"ATOXGR\"), fixed = TRUE), base_toxgrade_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = c(\"BTOXGR\")), selected = c(\"BTOXGR\"), fixed = TRUE), id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), add_total = FALSE, total_label = default_total_label(), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, na_level = default_na_str(), code_missing_baseline = FALSE, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. worst_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used worst flag variable. worst_flag_indicator (teal.transform::choices_selected()) value indicating worst grade. anl_toxgrade_var (teal.transform::choices_selected()) variable analysis toxicity grade. base_toxgrade_var (teal.transform::choices_selected()) variable baseline toxicity grade. id_var (teal.transform::choices_selected()) object specifying variable name subject id. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). code_missing_baseline (logical) whether missing baseline grades counted grade 0. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_grade.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_grade.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_shift_by_grade.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_shift_by_grade( label = \"Grade Laboratory Abnormality Table\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( choices = value_choices(ADLB, \"PARAMCD\", \"PARAM\"), selected = \"ALT\" ), worst_flag_var = choices_selected( choices = variable_choices(ADLB, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")), selected = c(\"WGRLOVFL\") ), worst_flag_indicator = choices_selected( value_choices(ADLB, \"WGRLOVFL\"), selected = \"Y\", fixed = TRUE ), anl_toxgrade_var = choices_selected( choices = variable_choices(ADLB, subset = c(\"ATOXGR\")), selected = c(\"ATOXGR\"), fixed = TRUE ), base_toxgrade_var = choices_selected( choices = variable_choices(ADLB, subset = c(\"BTOXGR\")), selected = c(\"BTOXGR\"), fixed = TRUE ), add_total = FALSE ) ), filter = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\")) ) #> Initializing tm_t_shift_by_grade #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_smq.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"module produces adverse events table Standardized MedDRA Query.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_smq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"","code":"tm_t_smq( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), llt, add_total = TRUE, total_label = default_total_label(), sort_criteria = c(\"freq_desc\", \"alpha\"), drop_arm_levels = TRUE, na_level = default_na_str(), smq_varlabel = \"Standardized MedDRA Query\", baskets, scopes, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_smq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. id_var (teal.transform::choices_selected()) object specifying variable name subject id. llt (teal.transform::choices_selected()) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). smq_varlabel (character) label use new column SMQ created tern::h_stack_by_baskets(). baskets (teal.transform::choices_selected()) object available choices preselected options standardized/customized queries. scopes (teal.transform::choices_selected()) object available choices scopes standardized queries. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_smq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_smq.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_smq.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_smq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae .names_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(ADAE), value = TRUE) .names_scopes <- grep(\"^SMQ.*SC$\", names(ADAE), value = TRUE) .cs_baskets <- choices_selected( choices = variable_choices(ADAE, subset = .names_baskets), selected = .names_baskets ) .cs_scopes <- choices_selected( choices = variable_choices(ADAE, subset = .names_scopes), selected = .names_scopes, fixed = TRUE ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_t_smq( label = \"Adverse Events by SMQ Table\", dataname = \"ADAE\", arm_var = choices_selected( choices = variable_choices(data[[\"ADSL\"]], subset = c(\"ARM\", \"SEX\")), selected = \"ARM\" ), add_total = FALSE, baskets = data[[\".cs_baskets\"]], scopes = data[[\".cs_scopes\"]], llt = choices_selected( choices = variable_choices(data[[\"ADAE\"]], subset = c(\"AEDECOD\")), selected = \"AEDECOD\" ) ) ) ) #> Initializing tm_t_smq #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Summary of Variables — tm_t_summary","title":"teal Module: Summary of Variables — tm_t_summary","text":"module produces table summarize variables.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Summary of Variables — tm_t_summary","text":"","code":"tm_t_summary( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, summarize_vars, add_total = TRUE, total_label = default_total_label(), show_arm_var_labels = TRUE, useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"mean_ci\", \"median\", \"median_ci\", \"quantiles\", \"range\", \"geom_mean\"), denominator = c(\"N\", \"n\", \"omit\"), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Summary of Variables — tm_t_summary","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. summarize_vars (teal.transform::choices_selected()) names variables summarized. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). show_arm_var_labels (flag) whether arm variable label(s) displayed. Defaults TRUE. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Summary of Variables — tm_t_summary","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Summary of Variables — tm_t_summary","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Summary of Variables — tm_t_summary","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Summary of Variables — tm_t_summary","text":"","code":"# Preparation of the test case - use `EOSDY` and `DCSREAS` variables to demonstrate missing data. data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADSL$EOSDY[1] <- NA_integer_ }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] app <- init( data = data, modules = modules( tm_t_summary( label = \"Demographic Table\", dataname = \"ADSL\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), add_total = TRUE, summarize_vars = choices_selected( c(\"SEX\", \"RACE\", \"BMRKR2\", \"EOSDY\", \"DCSREAS\", \"AGE\"), c(\"SEX\", \"RACE\") ), useNA = \"ifany\" ) ) ) #> Initializing tm_t_summary #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary_by.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"module produces table summarize variables row groups.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary_by.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"","code":"tm_t_summary_by( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, by_vars, summarize_vars, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), paramcd = NULL, add_total = TRUE, total_label = default_total_label(), parallel_vars = FALSE, row_groups = FALSE, useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"median\", \"range\"), denominator = teal.transform::choices_selected(c(\"n\", \"N\", \"omit\"), \"omit\", fixed = TRUE), drop_arm_levels = TRUE, drop_zero_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary_by.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. by_vars (teal.transform::choices_selected()) object available choices preselected option variable names used split summary rows. summarize_vars (teal.transform::choices_selected()) names variables summarized. id_var (teal.transform::choices_selected()) object specifying variable name subject id. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). parallel_vars (logical) whether summarized variables arranged columns. Can set TRUE chosen analysis variables numeric. row_groups (logical) whether summarized variables arranged row groups. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. drop_zero_levels (logical) whether rows zero counts columns removed table. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary_by.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary_by.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary_by.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_summary_by.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_summary_by( label = \"Summary by Row Groups Table\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), add_total = TRUE, by_vars = choices_selected( choices = variable_choices(ADLB, c(\"PARAM\", \"AVISIT\")), selected = c(\"AVISIT\") ), summarize_vars = choices_selected( choices = variable_choices(ADLB, c(\"AVAL\", \"CHG\")), selected = c(\"AVAL\") ), useNA = \"ifany\", paramcd = choices_selected( choices = value_choices(ADLB, \"PARAMCD\", \"PARAM\"), selected = \"ALT\" ) ) ) ) #> Initializing tm_t_summary_by #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Time-To-Event Table — tm_t_tte","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"module produces time--event analysis summary table, consistent TLG Catalog template TTET01 available .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"","code":"tm_t_tte( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, strata_var, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), conf_level_coxph = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), conf_level_survfit = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), time_points, time_unit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), event_desc_var = teal.transform::choices_selected(\"EVNTDESC\", \"EVNTDESC\", fixed = TRUE), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. conf_level_coxph (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). conf_level_survfit (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). time_points (teal.transform::choices_selected()) object available choices preselected option time points can used tern::surv_timepoint(). time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. event_desc_var (character teal.transform::data_extract_spec()) variable name event description information, optional. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"core functionality module based tern::coxph_pairwise(), tern::surv_timepoint(), tern::surv_time() tern package. arm stratification variables taken parentname data. following variables used module: AVAL: time event CNSR: 1 record AVAL censored, 0 otherwise PARAMCD: variable used filter endpoint (e.g. OS). filtering PARAMCD one observation per patient expected","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/tm_t_tte.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) app <- init( data = data, modules = modules( tm_t_tte( label = \"Time To Event Table\", dataname = \"ADTTE\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), strata_var = choices_selected( variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")), \"SEX\" ), time_points = choices_selected(c(182, 243), 182), event_desc_var = choices_selected( variable_choices(ADTTE, \"EVNTDESC\"), \"EVNTDESC\", fixed = TRUE ) ) ) ) #> Initializing tm_t_tte #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/validate_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"Check vector valid used treatment arm variable","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/validate_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"","code":"validate_arm(arm_vec)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/validate_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"arm_vec vector validated","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/validate_arm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"validate error returned vector factor detailed error message entries empty strings","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/validate_standard_inputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate standard input values for a teal module — validate_standard_inputs","text":"","code":"validate_standard_inputs( adsl, adslvars = character(0), anl, anlvars = character(0), need_arm = TRUE, arm_var, ref_arm, comp_arm, min_n_levels_armvar = 1L, max_n_levels_armvar = 100L, min_nrow = 1 )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/reference/validate_standard_inputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate standard input values for a teal module — validate_standard_inputs","text":"adsl data.frame subject-level data adslvars required variables ADSL anl data.frame analysis data anlvars required variables ANL need_arm flag indicating whether grouping variable arm_var required can optionally NULL. arm_var character name grouping variable, typically arm ref_arm character name reference level arm_var comp_arm character name comparison level arm_var min_n_levels_armvar minimum number levels grouping variable arm_var. Defaults 1, NULL minimum. max_n_levels_armvar maximum number levels grouping variable arm_var. Use NULL maximum. min_nrow minimum number observations ADSL ANL","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-9-1-9042","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.9.1.9042","text":"Added teal.logger functionality logging changes shiny inputs modules. Introduced ylim parameter tm_g_km module controls width y-axis. Added functionality tm_t_events_patyear split columns multiple (nested) variables via arm_var argument. Added arguments arm_var_labels template_summary show_arm_var_labels tm_t_summary allow user display arm variable (arm_var) labels table header. Added argument stats modules tm_g_forest_rsp tm_g_forest_tte allow users specify statistics include table. Added argument riskdiff modules tm_g_forest_rsp tm_g_forest_tte allow users add risk difference table column. Added count_dth count_wd parameters tm_t_events_summary select/deselect “Total number deaths” “Total number patients withdrawn study due AE” rows, respectively. options correspond “Count deaths” “Count withdrawals due AE” checkboxes available module run.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-9-1-9042","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.9.1.9042","text":"Removed Show Warnings modals modules. Clarified documentation specifying whether multiple values can selected arm_var argument module. Replaced use rtables::add_colcounts() function show_colcounts argument basic_table(). Began deprecation cycle show_labels argument template_summary effect tm_t_summary module. Replaced instances deprecated strata argument tern::control_lineplot_vars() group_var.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-9-1-9042","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.9.1.9042","text":"Fixed bug creating modules delayed_data teal.transform::all_choices.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-091","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.9.1","title":"teal.modules.clinical 0.9.1","text":"CRAN release: 2024-04-27","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-9-1","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.9.1","text":"Updated tm_g_forest_rsp tm_g_forest_tte use refactored version g_forest. Plots now displayed ggplot objects instead grob objects. Added parameters font_size rel_width_forest control font size width plot relative table, respectively. Updated tm_t_summary_by allow NULL input paramcd argument. Updated tm_g_km use refactored version g_km. Plots now displayed ggplot objects instead grob objects. Added parameters rel_height_plot, font_size, control_annot_surv_med, control_annot_coxph control height plot relative table, font size, median survival time table size, Cox-PH table size, respectively. Added control argument tm_t_binary_outcome control settings analysis (methods, confidence intervals, odds ratios) within module.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-9-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.9.1","text":"Replaced instances deprecated na_level argument tern functions na_str. Replaced argument/list element name strata instead strat tern function calls following deprecation argument/name within tern. Removed formatters dependencies replaced use functions relating variable labels functions teal.data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-090","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.9.0","title":"teal.modules.clinical 0.9.0","text":"CRAN release: 2024-02-23","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"breaking-changes-0-9-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"teal.modules.clinical 0.9.0","text":"Adapted modules use teal_data objects. Module arguments previously accepted inputs teal.transform::choices_selected() teal.transform::data_extract_spec() now accept input teal.transform::choices_selected(). affected modules : tm_a_gee, tm_a_mmrm, tm_g_ci, tm_g_forest_rsp, tm_g_forest_tte, tm_g_ipp, tm_g_km, tm_g_lineplot, tm_g_pp_adverse_events, tm_g_pp_patient_timeline, tm_g_pp_therapy, tm_g_pp_vitals, tm_t_abnormality, tm_t_abnormality_by_worst_grade, tm_t_ancova, tm_t_binary_outcome, tm_t_coxreg, tm_t_events, tm_t_events_by_grade, tm_t_events_patyear, tm_t_events_summary, tm_t_exposure, tm_t_logistic, tm_t_mult_events, tm_t_pp_basic_info, tm_t_pp_laboratory, tm_t_pp_medical_history, tm_t_pp_prior_medication, tm_t_shift_by_arm, tm_t_shift_by_arm_by_worst, tm_t_shift_by_grade, tm_t_smq, tm_t_summary, tm_t_summary_by, tm_t_tte","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-9-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.9.0","text":"Updated documentation vignettes demonstrate method pass teal_data object teal::init(). Simplify examples vignettes code removing package prefixes possible. Added parameter sort_freq_col tm_t_events allow user select column use sorting decreasing frequency. Added parameter incl_overall_sum tm_t_events allow user choose whether overall summary rows included top table. Updated documentation vignettes demonstrate method pass teal_data object teal::init(). Added default_total_label set_default_total_label functions get set default total column label (total_label) modules. Implemented tern::default_na_str tern::set_default_na_str functions get set default missing value replacement string (na_level) modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-9-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.9.0","text":"Fixed bug tm_g_lineplot forcing module initialize table. Fixes partial matching.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-9-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.9.0","text":"Deprecated aval argument tm_t_pp_laboratory tm_g_pp_vitals replaced aval_var argument. Deprecated avalu argument tm_t_pp_laboratory replaced avalu_var argument. Deprecated base_var argument tm_g_ipp, tm_t_shift_by_arm, template_shift_by_arm_by_worst replaced baseline_var argument. Specified minimal version package dependencies. Replaced usage deprecated summarize_vars function analyze_vars. Reduced package dependencies (removed tidyr, rlang, magrittr styler). Introduced tests partial matching.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-16","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.16","text":"Added informative error message grade mapping error occurs tm_t_abnormality_by_worst_grade. Fixed label indentation tm_t_abnormality_by_worst_grade. Added total_label argument enable customization “Patients” column/row label following modules: tm_a_mmrm, tm_t_abnormality, tm_t_abnormality_by_worst_grade, tm_t_binary_outcome, tm_t_events, tm_t_events_by_grade, tm_t_events_patyear, tm_t_events_summary, tm_t_exposure, tm_t_mult_events, tm_t_shift_by_arm, tm_t_shift_by_arm_worst, tm_t_shift_by_grade, tm_t_smq, tm_t_summary, tm_t_summary_by, tm_t_tte. Increased default width tm_g_forest_tte plot prevent overlapping text. Improved default annotation table sizing tm_g_km. Refactored tm_t_exposure display “total” row last row table instead summary row. Added parameters add_total_row set whether total row displayed total_row_label set total row label. Updated tm_t_events maintain indentation pruning. Updated default reference/comparison arm level selection work arm variable levels filtered . Updated tm_t_coxreg drop factor covariate variable levels present avoid errors filtering. Updated tm_t_pp_basic_info, tm_t_pp_medical_history, tm_g_pp_therapy, tm_g_pp_adverse_events, tm_t_pp_laboratory print patient ID table. Updated tm_t_pp_basic_info, tm_g_pp_therapy, tm_g_pp_adverse_events, tm_t_pp_laboratory use rlistings print data neatly reports. Updated tm_g_lineplot allow user remove interval plot. Updated documentation vignettes demonstrate method pass teal_data object teal::init().","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-16","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.16","text":"Fixed bug tm_t_coxreg preventing table displayed covariates selected.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-16","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.16","text":"Updated control_incidence_rate parameter names tm_t_events_patyear time_unit_input time_unit_output input_time_unit num_pt_year, respectively, parameter names changed tern. Hid datasets used patient profile modules filter panel. Replaced datanames = \"\" parameter datasets used internally module.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"breaking-changes-0-8-15","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.modules.clinical 0.8.15","text":"Replaced chunks simpler qenv class. Replaced datasets argument containing FilteredData new arguments data (tdata object) filter_panel_api (FilterPanelAPI).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-15","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.15","text":"Replaced synthetic_cdisc_data refactored synthetic_cdisc_dataset function speed dataset loading tests/examples. Added new GEE module tm_a_gee. Added interface selecting interaction term tm_t_ancova. Updated encoding input checks use shinyvalidate::InputValidator better UI experience. Previously used shiny::validate. Added option tm_a_mmrm allow Kenward-Roger adjustments standard errors p-values. Added option choose facet scale options tm_g_barchart_simple. Added label parameter cs_to_select_spec/cs_to_des_select cs_to_filter_spec/cs_to_des_filter allow user customize label printed selection field. Updated tm_t_coxreg module refactoring summarize_coxreg tern fix indentation. Updated tm_t_exposure module use new function analyze_patients_exposure_in_cols fix table structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-15","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.15","text":"Fixed bug causing overlapping bars tm_g_barchart_simple. Fixed bug figures svg format. Fixed bug tm_t_summary tm_t_summary_by preventing users specifying numeric_stats argument.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-15","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.15","text":"Updated package Suggests use scda.2022 rather scda.2021. Removed unused argument param tm_g_pp_vitals. Removed optimizer choice tm_a_mmrm since can always use automatically determined optimizer. Created datasets use examples/tests adsl, adae, adaette, adcm, adeg, adex, adlb, admh, adqs, adrs, adtte, advs. datasets stored data folder accessible via tmc_ex_* prefix. Updated examples tests use datasets teal.modules.clinical package instead scda datasets. Updated tests use testthat 3rd edition replaced applicable tests snapshot testing. Implemented lubridate package date variables internal data. Changed default value plot_width tm_g_forest_rsp prevent clutter.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-14","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.14","text":"Updated synthetic data tests version rcd_2022_02_28. Updated test files tests/testthat/ synthetic_cdisc_data(\"2022_02_28\") Reverted missing data checkbox tm_t_summary (encoding filtering separate). Implemented new widget allows dragging dropping select comparison groups. Added teal.reporter functionality modules. Enhanced tm_t_pp_medical_history module use table_with_settings module return rtables object. Implemented nestcolor examples, refactored tm_g_barchart_simple allow use nestcolor. Added descriptive title/labels visit name subtitle tm_g_ci. Updated tm_a_mmrm column name deselecting treatment “obs” “Patients”, added subtitles footnotes. Added title parameter category subtitle tm_t_exposure, cleaned labels. Added titles worse flag variable subtitles tm_t_shift_by_grade tm_t_shift_by_arm_by_worst. Added footnote tm_t_events_patyear CI method. Added subtitle footnotes tm_g_km. Added Stratified Analysis CI method option panel tm_t_binary_outcome. Added validation covariate/visit conflicts tm_a_mmrm. Remove unnecessary brackets header tm_t_exposure. Hid footnotes tm_g_km tm_t_tte “Compare Treatments” .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-14","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.14","text":"Fixed bug tm_g_barchart_simple prevented display graph. Fixed broken example tm_t_abnormality_by_worst_grade. Fixed bug tm_a_mmrm prevented table headers displaying. Fixed bug tm_g_forest_rsp deselecting endpoint. Fixed bug tm_t_binary_outcome crashed app deselecting paramcd. Fixed teal.reporter card names tm_t_smq. Fixed bug tm_t_shift_by_arm_by_worst adding validations choosing different endpoint values. Fixed bug tm_t_coxreg preventing footnotes displaying univariate models.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-14","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.14","text":"Added nestcolor dependency replaced deprecated function tern::color_palette nestcolor::color_palette.","code":""},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tm_g_pp_adverse_events-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"tm_g_pp_adverse_events","title":"teal.modules.clinical 0.8.13","text":"Updated position labels. Updated plot render color legend.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tm_t_summary_by-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"tm_t_summary_by","title":"teal.modules.clinical 0.8.13","text":"Enhanced module support geometric mean encoding panel.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tm_t_summary-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"tm_t_summary","title":"teal.modules.clinical 0.8.13","text":"Updated added footnote. Enhanced module support geometric mean encoding panel. Updated module display checkboxes numeric variables statistics numeric variables part selected. Updated validations warn users using dataset non unique identifiers selecting variables non supported types (.e. Date, POSIXt). Added checkbox remove column generated missing values.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"other-modules-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"Other modules","title":"teal.modules.clinical 0.8.13","text":"Updated tm_t_binary_outcome enable option apply continuity correction Newcombe method. Simplified show R code tm_g_pp_patient_timeline module. Improved names code chunks shown Debug Info. Improved validation treatment variable factor.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-13","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.13","text":"Fixed summarize_logistic implementation broken empty string error. upstream. _NA_ new standard flag allow pivot empty entries data frames. Took @title tm_t_binary_outcome.R producing warning. Updated validation account error selecting single variable tm_g_pp_patient_timeline module.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-13","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.13","text":"Added pkgdown template documentation. Updated package authors.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-12","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.12","text":"Changed input Covariates tm_t_coxreg.R track user input reflect order table.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"new-features-0-8-12","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.12","text":"Added new module tm_t_shift_by_arm_by_worst analysis laboratory abnormalities severe grade flag. Enhanced tm_t_events_patyear include selected parameter title table. Enhanced tm_t_mult_events include selected parameter title table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-12","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.12","text":"Rewrote modules use moduleServer updated calls teal.devel modules also written use moduleServer. Changed way obtaining selection ordered changes teal.devel. Use ordered = TRUE cs_to_des_select cs_to_select_spec return ordered selection. Replaced calls teal::root_modules teal::modules following deprecation teal::root_modules. tm_t_events_summary now allows nested arm_var columns matching outputs tm_t_events. Added validation tm_t_abnormality_by_worst_grade arm_var selected. Enhanced tm_t_binary_outcome include responders response table default. Added subtitle tm_g_forest_tte, tm_t_coxreg, tm_t_binary_outcome listing stratification factors.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-12","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.12","text":"Fixed bug prevent processing empty sets data tm_g_forest_rsp.R causing shiny errors runtime. Fixed bug closed Compare Treatments conditional panel marked Combine comparison groups? option conflicted adding column patients tables tm_t_binary_outcome.R tm_t_tte.R.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-12-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.12","text":"Replaced deprecated rtables::var_labels calls documentation examples. Add import tern.mmrm package change references split tern. Adjusted package imports take account changes teal framework. Ensure consistent vertical order tm_g_pp_patient_timeline output switching absolute relative days.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"breaking-changes-0-8-11","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.modules.clinical 0.8.11","text":"Updated tm_t_abnormality due changes count_abnormal abnormal argument taking list input now. Changed tm_g_pp_patient_timeline parameter, cmtrt, cmdecod.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"new-features-0-8-11","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.11","text":"Added new module tm_t_abnormality_by_worst_grade analysis laboratory test results highest grade post-baseline. Enhanced tm_t_ancova include selected parameter(s), visit(s) analysis variable title table. Added new module tm_g_lineplot creating line plots. Enhanced tm_t_logistic include selected parameter title table. Enhanced tm_g_forest_rsp include selected parameter title table. Enhanced tm_g_forest_tte include selected parameter title table. Enhanced tm_g_pp_patient_timeline bold axes labels integer values axis. Enhanced tm_g_ipp allow users display AVALU title y axis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-11","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.11","text":"Added support logging logger package added info level logs upon initialization module. Added default_responses argument tm_t_binary_outcome tm_g_forest_rsp allow user specify default selected responses possible response levels. Updated tm_t_binary_outcome show selected responses output table selecting “Show Selected Response Categories”. Added rsp_table argument tm_t_binary_outcome allow user initialize module matching RSPT01 STREAM template. Added support custom arguments ggplot2::labs ggplot2::theme plot based modules. Added support custom arguments rtables::basic_table table based modules. Updated tm_t_binary_outcome enable option apply continuity correction Wilson method.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-11","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.11","text":"Updated required R version >= 3.6. Refactored calls defunct teal.devel::data_extract_input calls replacement teal.devel::data_extract_ui. Updated modules use new data_merge_module interface provided teal.devel removed usage now deprecated function teal.devel::get_input_order. Updated tm_t_binary_outcome module add template removed now deprecated module tm_t_rsp. Removed utils.nest dependency replaced calls checkmate equivalents.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-11","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"teal.modules.clinical 0.8.11","text":"Fixed bug tm_g_pp_therapy cmstdy cmendy argument type integer causes plot crash.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"new-features-0-8-10","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.10","text":"Added new module tm_t_smq analysis adverse events Standardized MedDRA Query. Added new module tm_t_shift_by_grade analysis grade laboratory abnormalities. Added new module tm_t_exposure analysis duration exposure risk management plan. Added new module tm_t_shift_by_arm can display shift table ECG interval data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-10","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.10","text":"Corrected tm_a_mmrm able consider treatment variable interactions. Fixed tm_t_binary_outcome tm_t_rsp choose correct CI estimation method Proportions Difference Stratified Analysis (.e. Wald-type confidence interval CMH weights).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-10","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.10","text":"Added validation checks tm_t_rsp tm_t_binary_outcome stratification errors applied filters. Added tm_g_km validation check plot tables font size. Enhanced tm_g_km add selected paramcd plot title. tm_t_events now can display layouts two nested column treatment variables. options pruning sorting available. Exported package helper functions. Updated tm_t_events_by_grade display grading groups nested columns col_by_grade option support pruning sorting options like tm_t_events. Used format_count_fraction fix formatting inconsistency tm_t_events_summary. Updated count_occurrences vars argument tm_t_shift_by_grade. Updated tm_t_pp_laboratory display 4 decimals default. Updated tm_t_events_by_grade use trim_levels_in_group split function instead trim_rows function. Added table title tm_t_tte. Added table titles tm_t_rsp tm_t_binary_outcome.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-10","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.10","text":"Updated LICENCE README new package references. Added error_on_lint: TRUE .lintr. Removed insert_rrow updated usage count_patients_by_flags tm_t_events_summary. Changed package calls functions dplyr package. functions now fully specified (e.g. dplyr::filter).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"new-features-0-8-9","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.9","text":"Added capability remember order user input encoding UI elements. Inputs marked double arrow icon tracking enabled. affected modules : tm_t_summary, tm_t_summary_by, tm_g_forest_rsp, tm_g_forest_tte, tm_t_events_summary, tm_t_abnormality, tm_t_mult_events. Added new argument numeric_stats tm_t_summary tm_t_summary_by control displayed summary statistics numeric variables. Added new argument drop_zero_levels tm_t_summary_by can drop rows zeros result table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-9","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.9","text":"Split tm_g_patient_profile tabs 8 separate new modules. Added option select patient ID filter panel modules patient profile. Added validation tm_g_patient_timeline plot empty. Enhanced tm_a_mmrm work without treatment variable. Added option choose number decimal places rounding tm_t_pp_laboratory. Added check box tm_g_pp_patient_timeline hiding/showing relative study days x-axis. Added title patient’s id plots patient profile modules. Made gray error message tm_g_forest_tte informative deselecting Endpoint column left-hand encoding panel. Added twenty-fifth seventy-fifth quantile summary statistics tm_t_summary. Added interaction p-value column tm_t_coxreg. Added validation tm_t_ancova selected covariate variables contain one level. Added validation tm_t_events_patyear events variable empty. Changed font size input description tm_g_km precisely describe controls. Enhanced tm_t_logistic interaction choices depend selected covariates. Enhanced tm_t_rsp strata input visible comparing treatments.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-9","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.9","text":"Fixed Get R Code output tm_t_pp_laboratory return identical HTML formatted table displayed app. Added validation tm_t_coxreg ensure treatment, strata covariate variables overlap. Limited label repel feature tm_g_pp_patient_timeline X-axis consistent look. Updated tm_t_summary_by paramcd required analyzing ADSL variables. Updated tm_t_coxreg can work covariate selected. Updated tm_a_mmrm can work treatment variable selected. Updated tm_g_forest_tte total number events also shown table. Updated tm_t_events_summary work pooled studies. Updated validation level tm_t_coxreg. Updated validation level tm_t_logistic. Added validation tm_t_binary_outcome tm_t_rsp ensure strata variable contains one level selecting one strata variable. Updated warning message deselecting statistics tm_t_summary tm_t_summary_by explain need select least one statistic.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-8","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.8","text":"Added option download expand tables. tm_g_km added support downloading images updated x-axis label show title case. Added slider font size plots. Added persistence selected table lengths. timeline plot now supports edge cases. vitals tab, removed unused label text legend, updated plot display stable colors per levels, cleared x-axis limit fixed legend update filtering. Also added note clarify supported horizontal lines cases. Updated adverse events tab show warning message instead empty plot data empty. Fixed PARAMCD selected levels current patient. Updated pre-processing code inside template_tte dataset without events still produces table. Updated code use correct denominator duration response endpoints. Modified parameter arm_var accept one column. selecting two columns arm_var, second variable nest first one. Added argument show_labels template_summary show label single summary variable table. Added new parameter conf_arg tm_t_rsp consistent efficacy modules. Added validation statement tm_g_ipp module print message deselecting Timepoint Variable drop-. Removed header definition tm_g_forest_rsp tm_g_forest_tte now default header g_forest. Fixed validation statement tm_t_coxreg models without strata using likelihood tests return result. Clarified functionality drop_arm_levels tm_t_summary tm_t_summary_by. encodings panel, checkbox show parent dataset analysis dataset different.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-8","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.8","text":"Replaced remaining two observe function calls observeEvent optimize performance. Fixed grammar “Select patient’s id” error message tm_g_patient_profile. Fixed font_size default templates 12L instead vector 3 integers cleaned associated unnecessary code. Fixed deprecated function warning tm_g_barchart_simple. Fixed subgroup_var definition truncation tm_g_forest_rsp tm_g_forest_tte. Clarified labeling related regression type encoding panel tm_t_coxreg.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-8","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.8","text":"Added validation case filtering rows therapy tab tm_g_patient_profile. Updated internals modules read data correct field filter_spec objects. Fixed reactivity filter panel PARAMCD variable levels input tm_g_patient_profile vitals tab plot get reset filtering. Updated vitals plot tab tm_g_patient_profile drop NA entries plot. Updated tm_t_coxreg take values account. Added check tm_t_coxreg interactions univariate models multivariate models. Updated tm_t_events_summary work pooled studies.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"new-module-0-8-7","dir":"Changelog","previous_headings":"","what":"New Module","title":"teal.modules.clinical 0.8.7","text":"Added new module tm_g_patient_profile profile patients based predefined categories. Added new module tm_g_ipp individual patient plots.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-7","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.7","text":"Added argument drop_arm_levels safety modules. allows removal columns based factor levels found filtered data. Updated tm_g_km allow plot failure probability y-axis, tick interval selection x-axis option create plot without confidence interval ribbon (new default). Added argument time_unit_var template_g_km add time unit x-axis label.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-7","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.7","text":"Removed redundant Analysis Data: label Encodings Panel. Removed limit requiring 15 fewer columns tabulation modules. New upper threshold 100 columns. Decreased lower limit number observations required modules. Safety tables require least one record. Requirements efficacy outputs per treatment group: tm_a_mmrm requires five records, tm_t_logistic tm_t_coxreg require two records, remaining modules require least one record per treatment group. graphs, lower threshold two records. Removed argument cnsr_val tm_t_events_patyear added new argument events_var. arm_ref_comp_observer include parentname argument. Show R code include datasets retrieved data_extract_spec objects. Refactored stringr dependency patient profile module. Added missing table calls chunks tm_t_events tm_t_events_by_grade.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"new-features-0-8-6","dir":"Changelog","previous_headings":"","what":"New Features","title":"teal.modules.clinical 0.8.6","text":"Added new module tm_g_ci confidence interval plots. Added new module tm_t_ancova analysis variance summary tables. Added new module tm_t_mult_events multi-event tables.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"enhancements-0-8-6","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.6","text":"Refactored modules using redesigned rtables tern packages. Enhanced modules. now take advantage data_extract_spec data_merge_module functionality teal. Reduced clutter repeated datasets encodings panels. Updated modules use OptionalSelectInput conf_level.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"miscellaneous-0-8-6","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.6","text":"Added vignette substitute can helpful developing analysis template functions teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"bug-fixes-0-8-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.6","text":"Updated tm_t_events module use user’s non-default choices prune_freq prune_diff.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-085","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.5","title":"teal.modules.clinical 0.8.5","text":"graph modules now accept plot_width argument specifies plot width renders slider adjust width interactively module. FilteredData object now passed arm_ref_comp_observer modules now support nested lists containing delayed_data objects. Replace plot_with_height module new plot_with_settings module. Update examples use code argument inside cdisc_dataset.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-084","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.4","title":"teal.modules.clinical 0.8.4","text":"Extend tm_t_coxreg optionally produce univariate Cox regressions. Updated tm_t_binary_outcome display Odds Ratio estimates, include new methods CIs p-values display summary individual response categories. Updated tm_t_tte optionally compare arms, removed conf_level argument. Updated tm_g_km optionally compare arms. Extend tm_g_km optionally scale X axis range case one plot. New tm_a_mmrm MMRM analysis. Deprecated tm_t_mmrm (superseded tm_a_mmrm).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-083","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.3","title":"teal.modules.clinical 0.8.3","text":"New tm_t_coxreg module multi-variable Cox regressions. New tm_t_binary_outcome module. New tm_t_events_patyear module: events rate adjusted patient-year risk table. Remove grade_levels argument tm_t_events_by_grade. Updated response table single arm. New tm_t_abnormality module. Removed get_relabel_call get_relabel_call2 favor teal.devel::get_relabel_call teal.devel::get_anl_relabel_call.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-082","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.2","title":"teal.modules.clinical 0.8.2","text":"Add confidence level survfit, coxph, ztest; add confidence type, ties, percentiles tm_t_tte. Optionally use single term tm_t_events tm_t_events_by_grade modules. New tm_t_logistic module. New tm_t_mmrm module. New modules tm_t_summary_by tm_t_events_summary. Add stratified analysis tm_g_forest_tte tm_g_forest_rsp. Add confidence level plotting symbol size options tm_g_forest_rsp tm_g_forest_tte.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-081","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.1","title":"teal.modules.clinical 0.8.1","text":"New tm_t_events tm_t_events_by_grade modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-080","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.0","title":"teal.modules.clinical 0.8.0","text":"Optionally show KM CoxPH table tm_g_km.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-070","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.7.0","title":"teal.modules.clinical 0.7.0","text":"Use teal.devel.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/news/index.html","id":"tealmodulesclinical-060","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.6.0","title":"teal.modules.clinical 0.6.0","text":"Package renamed teal.modules.clinical. Rename tm_t_summarize_variables tm_t_summary. Usage teal::choices_selected() function instead *_var *_var_choices arguments.","code":""}]
+[{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"generating-minimal-data-to-test-teal-modules-clinical","dir":"Articles","previous_headings":"","what":"Generating minimal data to test teal.modules.clinical","title":"Example Data Generation","text":"following script used create save cached synthetic CDISC data data/ directory use examples tests teal.modules.clinical package. script/vignette initialized Emily de la Rua tern. Disclaimer: vignette concerns mainly development minimal stable test data kept internal feature tracking.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"setup-helper-functions","dir":"Articles","previous_headings":"","what":"Setup & Helper Functions","title":"Example Data Generation","text":"","code":"library(dplyr) library(teal.data) study_duration_secs <- lubridate::seconds(lubridate::years(2)) sample_fct <- function(x, N, ...) { checkmate::assert_number(N) factor(sample(x, N, replace = TRUE, ...), levels = if (is.factor(x)) levels(x) else x) } retain <- function(df, value_var, event, outside = NA) { indices <- c(1, which(event == TRUE), nrow(df) + 1) values <- c(outside, value_var[event == TRUE]) rep(values, diff(indices)) } relvar_init <- function(relvar1, relvar2) { if (length(relvar1) != length(relvar2)) { message(simpleError( \"The argument value length of relvar1 and relvar2 differ. They must contain the same number of elements.\" )) return(NA) } return(list(\"relvar1\" = relvar1, \"relvar2\" = relvar2)) } rel_var <- function(df = NULL, var_name = NULL, var_values = NULL, related_var = NULL) { if (is.null(df)) { message(\"Missing data frame argument value.\") return(NA) } else { n_relvar1 <- length(unique(df[, related_var, drop = TRUE])) n_relvar2 <- length(var_values) if (n_relvar1 != n_relvar2) { message(paste(\"Unequal vector lengths for\", related_var, \"and\", var_name)) return(NA) } else { relvar1 <- unique(df[, related_var, drop = TRUE]) relvar2_values <- rep(NA, nrow(df)) for (r in seq_len(length(relvar1))) { matched <- which(df[, related_var, drop = TRUE] == relvar1[r]) relvar2_values[matched] <- var_values[r] } return(relvar2_values) } } } visit_schedule <- function(visit_format = \"WEEK\", n_assessments = 10L, n_days = 5L) { if (!(toupper(visit_format) %in% c(\"WEEK\", \"CYCLE\"))) { message(\"Visit format value must either be: WEEK or CYCLE\") return(NA) } if (toupper(visit_format) == \"WEEK\") { assessments <- 1:n_assessments assessments_ord <- -1:n_assessments visit_values <- c(\"SCREENING\", \"BASELINE\", paste(toupper(visit_format), assessments, \"DAY\", (assessments * 7) + 1)) } else if (toupper(visit_format) == \"CYCLE\") { cycles <- sort(rep(1:n_assessments, times = 1, each = n_days)) days <- rep(seq(1:n_days), times = n_assessments, each = 1) assessments_ord <- 0:(n_assessments * n_days) visit_values <- c(\"SCREENING\", paste(toupper(visit_format), cycles, \"DAY\", days)) } visit_values <- stats::reorder(factor(visit_values), assessments_ord) } rtpois <- function(n, lambda) stats::qpois(stats::runif(n, stats::dpois(0, lambda), 1), lambda) rtexp <- function(n, rate, l = NULL, r = NULL) { if (!is.null(l)) { l - log(1 - stats::runif(n)) / rate } else if (!is.null(r)) { -log(1 - stats::runif(n) * (1 - exp(-r * rate))) / rate } else { stats::rexp(n, rate) } } str_extract <- function(string, pattern) regmatches(string, gregexpr(pattern, string)) with_label <- function(x, label) { attr(x, \"label\") <- as.vector(label) x } common_var_labels <- c( USUBJID = \"Unique Subject Identifier\", STUDYID = \"Study Identifier\", PARAM = \"Parameter\", PARAMCD = \"Parameter Code\", AVISIT = \"Analysis Visit\", AVISITN = \"Analysis Visit (N)\", AVAL = \"Analysis Value\", AVALU = \"Analysis Value Unit\", AVALC = \"Character Result/Finding\", BASE = \"Baseline Value\", BASE2 = \"Screening Value\", ABLFL = \"Baseline Record Flag\", ABLFL2 = \"Screening Record Flag\", CHG = \"Absolute Change from Baseline\", PCHG = \"Percentage Change from Baseline\", ANRIND = \"Analysis Reference Range Indicator\", BNRIND = \"Baseline Reference Range Indicator\", ANRLO = \"Analysis Normal Range Lower Limit\", ANRHI = \"Analysis Normal Range Upper Limit\", CNSR = \"Censor\", ADTM = \"Analysis Datetime\", ADY = \"Analysis Relative Day\", ASTDY = \"Analysis Start Relative Day\", AENDY = \"Analysis End Relative Day\", ASTDTM = \"Analysis Start Datetime\", AENDTM = \"Analysis End Datetime\", VISITDY = \"Planned Study Day of Visit\", EVNTDESC = \"Event or Censoring Description\", CNSDTDSC = \"Censor Date Description\", BASETYPE = \"Baseline Type\", DTYPE = \"Derivation Type\", ONTRTFL = \"On Treatment Record Flag\", WORS01FL = \"Worst Observation in Window Flag 01\", WORS02FL = \"Worst Post-Baseline Observation\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adsl","dir":"Articles","previous_headings":"","what":"ADSL","title":"Example Data Generation","text":"","code":"generate_adsl <- function(N = 200) { set.seed(1) sys_dtm <- lubridate::fast_strptime(\"20/2/2019 11:16:16.683\", \"%d/%m/%Y %H:%M:%OS\", tz = \"UTC\") country_site_prob <- c(.5, .121, .077, .077, .075, .052, .046, .025, .014, .003) adsl <- tibble::tibble( STUDYID = rep(\"AB12345\", N) %>% with_label(\"Study Identifier\"), COUNTRY = sample_fct( c(\"CHN\", \"USA\", \"BRA\", \"PAK\", \"NGA\", \"RUS\", \"JPN\", \"GBR\", \"CAN\", \"CHE\"), N, prob = country_site_prob ) %>% with_label(\"Country\"), SITEID = sample_fct(1:20, N, prob = rep(country_site_prob, times = 2)), SUBJID = paste(\"id\", seq_len(N), sep = \"-\") %>% with_label(\"Subject Identifier for the Study\"), AGE = (sapply(stats::rchisq(N, df = 5, ncp = 10), max, 0) + 20) %>% with_label(\"Age\"), SEX = c(\"F\", \"M\") %>% sample_fct(N, prob = c(.52, .48)) %>% with_label(\"Sex\"), ARMCD = c(\"ARM A\", \"ARM B\", \"ARM C\") %>% sample_fct(N) %>% with_label(\"Planned Arm Code\"), ARM = dplyr::recode( .data$ARMCD, \"ARM A\" = \"A: Drug X\", \"ARM B\" = \"B: Placebo\", \"ARM C\" = \"C: Combination\" ) %>% with_label(\"Description of Planned Arm\"), ACTARMCD = .data$ARMCD %>% with_label(\"Actual Arm Code\"), ACTARM = .data$ARM %>% with_label(\"Description of Actual Arm\"), RACE = c( \"ASIAN\", \"BLACK OR AFRICAN AMERICAN\", \"WHITE\", \"AMERICAN INDIAN OR ALASKA NATIVE\", \"MULTIPLE\", \"NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER\", \"OTHER\", \"UNKNOWN\" ) %>% sample_fct(N, prob = c(.55, .23, .16, .05, .004, .003, .002, .002)) %>% with_label(\"Race\"), TRTSDTM = sys_dtm + sample(seq(0, study_duration_secs), size = N, replace = TRUE) %>% with_label(\"Datetime of First Exposure to Treatment\"), TRTEDTM = c(TRTSDTM + study_duration_secs) %>% with_label(\"Datetime of Last Exposure to Treatment\"), EOSDY = ceiling(as.numeric(difftime(TRTEDTM, TRTSDTM, units = \"days\"))) %>% with_label(\"End of Study Relative Day\"), EOSDT = lubridate::date(TRTEDTM) %>% with_label(\"End of Study Date\"), STRATA1 = c(\"A\", \"B\", \"C\") %>% sample_fct(N) %>% with_label(\"Stratification Factor 1\"), STRATA2 = c(\"S1\", \"S2\") %>% sample_fct(N) %>% with_label(\"Stratification Factor 2\"), BMRKR1 = stats::rchisq(N, 6) %>% with_label(\"Continuous Level Biomarker 1\"), BMRKR2 = sample_fct(c(\"LOW\", \"MEDIUM\", \"HIGH\"), N) %>% with_label(\"Continuous Level Biomarker 2\") ) # associate sites with countries and regions adsl <- adsl %>% dplyr::mutate( SITEID = paste0(.data$COUNTRY, \"-\", .data$SITEID) %>% with_label(\"Study Site Identifier\"), REGION1 = factor(dplyr::case_when( COUNTRY %in% c(\"NGA\") ~ \"Africa\", COUNTRY %in% c(\"CHN\", \"JPN\", \"PAK\") ~ \"Asia\", COUNTRY %in% c(\"RUS\") ~ \"Eurasia\", COUNTRY %in% c(\"GBR\") ~ \"Europe\", COUNTRY %in% c(\"CAN\", \"USA\") ~ \"North America\", COUNTRY %in% c(\"BRA\") ~ \"South America\", TRUE ~ as.character(NA) )) %>% with_label(\"Geographic Region 1\"), SAFFL = factor(\"Y\") %>% with_label(\"Safety Population Flag\") ) %>% dplyr::mutate( USUBJID = paste(.data$STUDYID, .data$SITEID, .data$SUBJID, sep = \"-\") %>% with_label(\"Unique Subject Identifier\") ) # disposition related variables # using probability of 1 for the \"DEATH\" level to ensure at least one death record exists l_dcsreas <- list( choices = c( \"ADVERSE EVENT\", \"DEATH\", \"LACK OF EFFICACY\", \"PHYSICIAN DECISION\", \"PROTOCOL VIOLATION\", \"WITHDRAWAL BY PARENT/GUARDIAN\", \"WITHDRAWAL BY SUBJECT\" ), prob = c(.2, 1, .1, .1, .2, .1, .1) ) l_dthcat_other <- list( choices = c( \"Post-study reporting of death\", \"LOST TO FOLLOW UP\", \"MISSING\", \"SUICIDE\", \"UNKNOWN\" ), prob = c(.1, .3, .3, .2, .1) ) adsl <- adsl %>% dplyr::mutate( EOSSTT = dplyr::case_when( EOSDY == max(EOSDY, na.rm = TRUE) ~ \"COMPLETED\", EOSDY < max(EOSDY, na.rm = TRUE) ~ \"DISCONTINUED\", is.na(TRTEDTM) ~ \"ONGOING\" ) %>% with_label(\"End of Study Status\") ) %>% dplyr::mutate( EOTSTT = .data$EOSSTT %>% with_label(\"End of Treatment Status\") ) %>% dplyr::mutate( DCSREAS = ifelse( .data$EOSSTT == \"DISCONTINUED\", sample(x = l_dcsreas$choices, size = N, replace = TRUE, prob = l_dcsreas$prob), as.character(NA) ) %>% with_label(\"Reason for Discontinuation from Study\") ) tmc_ex_adsl <- adsl %>% dplyr::mutate(DTHDT = dplyr::case_when( DCSREAS == \"DEATH\" ~ lubridate::date(TRTEDTM + lubridate::days(sample(0:50, size = N, replace = TRUE))) ) %>% with_label(\"Date of Death\")) save(tmc_ex_adsl, file = \"data/tmc_ex_adsl.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adae","dir":"Articles","previous_headings":"","what":"ADAE","title":"Example Data Generation","text":"","code":"generate_adae <- function(adsl = tmc_ex_adsl, max_n_aes = 5) { set.seed(1) lookup_ae <- tibble::tribble( ~AEBODSYS, ~AELLT, ~AEDECOD, ~AEHLT, ~AEHLGT, ~AETOXGR, ~AESOC, ~AESER, ~AEREL, \"cl A.1\", \"llt A.1.1.1.1\", \"dcd A.1.1.1.1\", \"hlt A.1.1.1\", \"hlgt A.1.1\", \"1\", \"cl A\", \"N\", \"N\", \"cl A.1\", \"llt A.1.1.1.2\", \"dcd A.1.1.1.2\", \"hlt A.1.1.1\", \"hlgt A.1.1\", \"2\", \"cl A\", \"Y\", \"N\", \"cl B.1\", \"llt B.1.1.1.1\", \"dcd B.1.1.1.1\", \"hlt B.1.1.1\", \"hlgt B.1.1\", \"5\", \"cl B\", \"Y\", \"Y\", \"cl B.2\", \"llt B.2.1.2.1\", \"dcd B.2.1.2.1\", \"hlt B.2.1.2\", \"hlgt B.2.1\", \"3\", \"cl B\", \"N\", \"N\", \"cl B.2\", \"llt B.2.2.3.1\", \"dcd B.2.2.3.1\", \"hlt B.2.2.3\", \"hlgt B.2.2\", \"1\", \"cl B\", \"Y\", \"N\", \"cl C.1\", \"llt C.1.1.1.3\", \"dcd C.1.1.1.3\", \"hlt C.1.1.1\", \"hlgt C.1.1\", \"4\", \"cl C\", \"N\", \"Y\", \"cl C.2\", \"llt C.2.1.2.1\", \"dcd C.2.1.2.1\", \"hlt C.2.1.2\", \"hlgt C.2.1\", \"2\", \"cl C\", \"N\", \"Y\", \"cl D.1\", \"llt D.1.1.1.1\", \"dcd D.1.1.1.1\", \"hlt D.1.1.1\", \"hlgt D.1.1\", \"5\", \"cl D\", \"Y\", \"Y\", \"cl D.1\", \"llt D.1.1.4.2\", \"dcd D.1.1.4.2\", \"hlt D.1.1.4\", \"hlgt D.1.1\", \"3\", \"cl D\", \"N\", \"N\", \"cl D.2\", \"llt D.2.1.5.3\", \"dcd D.2.1.5.3\", \"hlt D.2.1.5\", \"hlgt D.2.1\", \"1\", \"cl D\", \"N\", \"Y\" ) aag <- utils::read.table( sep = \",\", header = TRUE, text = paste( \"NAMVAR,SRCVAR,GRPTYPE,REFNAME,REFTERM,SCOPE\", \"CQ01NAM,AEDECOD,CUSTOM,D.2.1.5.3/A.1.1.1.1 aesi,dcd D.2.1.5.3,\", \"CQ01NAM,AEDECOD,CUSTOM,D.2.1.5.3/A.1.1.1.1 aesi,dcd A.1.1.1.1,\", \"SMQ01NAM,AEDECOD,SMQ,C.1.1.1.3/B.2.2.3.1 aesi,dcd C.1.1.1.3,BROAD\", \"SMQ01NAM,AEDECOD,SMQ,C.1.1.1.3/B.2.2.3.1 aesi,dcd B.2.2.3.1,BROAD\", \"SMQ02NAM,AEDECOD,SMQ,Y.9.9.9.9/Z.9.9.9.9 aesi,dcd Y.9.9.9.9,NARROW\", \"SMQ02NAM,AEDECOD,SMQ,Y.9.9.9.9/Z.9.9.9.9 aesi,dcd Z.9.9.9.9,NARROW\", sep = \"\\n\" ), stringsAsFactors = FALSE ) adae <- Map( function(id, sid) { n_aes <- sample(c(0, seq_len(max_n_aes)), 1) i <- sample(seq_len(nrow(lookup_ae)), n_aes, TRUE) dplyr::mutate( lookup_ae[i, ], USUBJID = id, STUDYID = sid ) }, adsl$USUBJID, adsl$STUDYID ) %>% Reduce(rbind, .) %>% `[`(c(10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9)) %>% dplyr::mutate( AETERM = gsub(\"dcd\", \"trm\", .data$AEDECOD) %>% with_label(\"Reported Term for the Adverse Event\"), AESEV = dplyr::case_when( AETOXGR == 1 ~ \"MILD\", AETOXGR %in% c(2, 3) ~ \"MODERATE\", AETOXGR %in% c(4, 5) ~ \"SEVERE\" ) %>% with_label(\"Severity/Intensity\") ) # merge adsl to be able to add AE date and study day variables adae <- dplyr::inner_join(adae, adsl, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\") %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::mutate(ASTDY = ceiling(difftime(ASTDTM, TRTSDTM, units = \"days\"))) %>% # add 1 to end of range incase both values passed to sample() are the same dplyr::mutate(AENDTM = sample( seq(lubridate::as_datetime(ASTDTM), lubridate::as_datetime(TRTENDT + 1), by = \"day\"), size = 1 )) %>% dplyr::mutate(AENDY = ceiling(difftime(AENDTM, TRTSDTM, units = \"days\"))) %>% dplyr::mutate(LDOSEDTM = dplyr::case_when( TRTSDTM < ASTDTM ~ lubridate::as_datetime(stats::runif(1, TRTSDTM, ASTDTM)), TRUE ~ ASTDTM )) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$AETERM) adae <- adae %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(AESEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$AETERM, .data$AESEQ ) outcomes <- c( \"UNKNOWN\", \"NOT RECOVERED/NOT RESOLVED\", \"RECOVERED/RESOLVED WITH SEQUELAE\", \"RECOVERING/RESOLVING\", \"RECOVERED/RESOLVED\" ) adae <- adae %>% dplyr::mutate( AEOUT = factor(ifelse( .data$AETOXGR == \"5\", \"FATAL\", as.character(sample_fct(outcomes, nrow(adae), prob = c(0.1, 0.2, 0.1, 0.3, 0.3))) )) %>% with_label(\"Outcome of Adverse Event\"), TRTEMFL = ifelse(.data$ASTDTM >= .data$TRTSDTM, \"Y\", \"\") %>% with_label(\"Treatment Emergent Analysis Flag\") ) l_aag <- split(aag, interaction(aag$NAMVAR, aag$SRCVAR, aag$GRPTYPE, drop = TRUE)) # Create aesi flags l_aesi <- lapply(l_aag, function(d_adag, d_adae) { names(d_adag)[names(d_adag) == \"REFTERM\"] <- d_adag$SRCVAR[1] names(d_adag)[names(d_adag) == \"REFNAME\"] <- d_adag$NAMVAR[1] if (d_adag$GRPTYPE[1] == \"CUSTOM\") { d_adag <- d_adag[-which(names(d_adag) == \"SCOPE\")] } else if (d_adag$GRPTYPE[1] == \"SMQ\") { names(d_adag)[names(d_adag) == \"SCOPE\"] <- paste0(substr(d_adag$NAMVAR[1], 1, 5), \"SC\") } d_adag <- d_adag[-which(names(d_adag) %in% c(\"NAMVAR\", \"SRCVAR\", \"GRPTYPE\"))] d_new <- dplyr::left_join(x = d_adae, y = d_adag, by = intersect(names(d_adae), names(d_adag))) d_new[, dplyr::setdiff(names(d_new), names(d_adae)), drop = FALSE] }, adae) adae <- dplyr::bind_cols(adae, l_aesi) actions <- c( \"DOSE RATE REDUCED\", \"UNKNOWN\", \"NOT APPLICABLE\", \"DRUG INTERRUPTED\", \"DRUG WITHDRAWN\", \"DOSE INCREASED\", \"DOSE NOT CHANGED\", \"DOSE REDUCED\", \"NOT EVALUABLE\" ) tmc_ex_adae <- adae %>% dplyr::mutate( AEACN = factor(ifelse( .data$AETOXGR == \"5\", \"NOT EVALUABLE\", as.character(sample_fct(actions, nrow(adae), prob = c(0.05, 0.05, 0.05, 0.01, 0.05, 0.1, 0.45, 0.1, 0.05))) )) %>% with_label(\"Action Taken With Study Treatment\") ) %>% col_relabel( AEBODSYS = \"Body System or Organ Class\", AELLT = \"Lowest Level Term\", AEDECOD = \"Dictionary-Derived Term\", AEHLT = \"High Level Term\", AEHLGT = \"High Level Group Term\", AETOXGR = \"Analysis Toxicity Grade\", AESOC = \"Primary System Organ Class\", AESER = \"Serious Event\", AEREL = \"Analysis Causality\", AESEQ = \"Sponsor-Defined Identifier\", LDOSEDTM = \"End Time/Time of Last Dose\", CQ01NAM = \"CQ 01 Reference Name\", SMQ01NAM = \"SMQ 01 Reference Name\", SMQ01SC = \"SMQ 01 Scope\", SMQ02NAM = \"SMQ 02 Reference Name\", SMQ02SC = \"SMQ 02 Scope\" ) i_lbls <- sapply( names(col_labels(tmc_ex_adae)[is.na(col_labels(tmc_ex_adae))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adae[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adae, file = \"data/tmc_ex_adae.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adaette","dir":"Articles","previous_headings":"","what":"ADAETTE","title":"Example Data Generation","text":"","code":"generate_adaette <- function(adsl = tmc_ex_adsl) { set.seed(1) lookup_adaette <- tibble::tribble( ~ARM, ~CATCD, ~CAT, ~LAMBDA, ~CNSR_P, \"ARM A\", \"1\", \"any adverse event\", 1 / 80, 0.4, \"ARM B\", \"1\", \"any adverse event\", 1 / 100, 0.2, \"ARM C\", \"1\", \"any adverse event\", 1 / 60, 0.42, \"ARM A\", \"2\", \"any serious adverse event\", 1 / 100, 0.3, \"ARM B\", \"2\", \"any serious adverse event\", 1 / 150, 0.1, \"ARM C\", \"2\", \"any serious adverse event\", 1 / 80, 0.32, \"ARM A\", \"3\", \"a grade 3-5 adverse event\", 1 / 80, 0.2, \"ARM B\", \"3\", \"a grade 3-5 adverse event\", 1 / 100, 0.08, \"ARM C\", \"3\", \"a grade 3-5 adverse event\", 1 / 60, 0.23 ) evntdescr_sel <- \"Preferred Term\" cnsdtdscr_sel <- c( \"Clinical Cut Off\", \"Completion or Discontinuation\", \"End of AE Reporting Period\" ) random_patient_data <- function(patient_info) { startdt <- lubridate::date(patient_info$TRTSDTM) trtedtm <- lubridate::floor_date(dplyr::case_when( is.na(patient_info$TRTEDTM) ~ lubridate::date(patient_info$TRTSDTM) + study_duration_secs, TRUE ~ lubridate::date(patient_info$TRTEDTM) ), unit = \"day\") enddts <- c(patient_info$EOSDT, lubridate::date(trtedtm)) enddts_min_index <- which.min(enddts) adt <- enddts[enddts_min_index] adtm <- lubridate::as_datetime(adt) ady <- as.numeric(adt - startdt + 1) data.frame( ARM = patient_info$ARM, STUDYID = patient_info$STUDYID, SITEID = patient_info$SITEID, USUBJID = patient_info$USUBJID, PARAMCD = \"AEREPTTE\", PARAM = \"Time to end of AE reporting period\", CNSR = 0, AVAL = lubridate::days(ady) / lubridate::years(1), AVALU = \"YEARS\", EVNTDESC = ifelse(enddts_min_index == 1, \"Completion or Discontinuation\", \"End of AE Reporting Period\"), CNSDTDSC = NA, ADTM = adtm, ADY = ady, stringsAsFactors = FALSE ) } paramcd_hy <- c(\"HYSTTEUL\", \"HYSTTEBL\") param_hy <- c(\"Time to Hy's Law Elevation in relation to ULN\", \"Time to Hy's Law Elevation in relation to Baseline\") param_init_list <- relvar_init(param_hy, paramcd_hy) adsl_hy <- dplyr::select(adsl, \"STUDYID\", \"USUBJID\", \"TRTSDTM\", \"SITEID\", \"ARM\") adaette_hy <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), stringsAsFactors = FALSE ) adaette_hy <- dplyr::left_join(adaette_hy, adsl_hy, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\") %>% dplyr::mutate( PARAMCD = factor(rel_var( df = as.data.frame(adaette_hy), var_values = param_init_list$relvar2, related_var = \"PARAM\" )) ) %>% dplyr::mutate( CNSR = sample(c(0, 1), prob = c(0.1, 0.9), size = dplyr::n(), replace = TRUE), EVNTDESC = dplyr::if_else( .data$CNSR == 0, \"First Post-Baseline Raised ALT or AST Elevation Result\", NA_character_ ), CNSDTDSC = dplyr::if_else(.data$CNSR == 0, NA_character_, sample(c(\"Last Post-Baseline ALT or AST Result\", \"Treatment Start\"), prob = c(0.9, 0.1), size = dplyr::n(), replace = TRUE ) ) ) %>% dplyr::rowwise() %>% dplyr::mutate(ADTM = dplyr::case_when( CNSDTDSC == \"Treatment Start\" ~ TRTSDTM, TRUE ~ TRTSDTM + sample(seq(0, study_duration_secs), size = dplyr::n(), replace = TRUE) )) %>% dplyr::mutate( ADY_int = lubridate::date(ADTM) - lubridate::date(TRTSDTM) + 1, ADY = as.numeric(ADY_int), AVAL = lubridate::days(ADY_int) / lubridate::weeks(1), AVALU = \"WEEKS\" ) %>% dplyr::select(-TRTSDTM, -ADY_int) random_ae_data <- function(lookup_info, patient_info, patient_data) { cnsr <- sample(c(0, 1), 1, prob = c(1 - lookup_info$CNSR_P, lookup_info$CNSR_P)) ae_rep_tte <- patient_data$AVAL[patient_data$PARAMCD == \"AEREPTTE\"] data.frame( ARM = rep(patient_data$ARM, 2), STUDYID = rep(patient_data$STUDYID, 2), SITEID = rep(patient_data$SITEID, 2), USUBJID = rep(patient_data$USUBJID, 2), PARAMCD = c( paste0(\"AETTE\", lookup_info$CATCD), paste0(\"AETOT\", lookup_info$CATCD) ), PARAM = c( paste(\"Time to first occurrence of\", lookup_info$CAT), paste(\"Number of occurrences of\", lookup_info$CAT) ), CNSR = c(cnsr, NA), AVAL = c( ifelse(cnsr == 1, ae_rep_tte, rtexp(1, lookup_info$LAMBDA * 365.25, r = ae_rep_tte)), ifelse(cnsr == 1, 0, rtpois(1, lookup_info$LAMBDA * 365.25)) ), AVALU = c(\"YEARS\", NA), EVNTDESC = c(ifelse(cnsr == 0, sample(evntdescr_sel, 1), \"\"), NA), CNSDTDSC = c(ifelse(cnsr == 1, sample(cnsdtdscr_sel, 1), \"\"), NA), stringsAsFactors = FALSE ) %>% dplyr::mutate( ADY = dplyr::if_else(is.na(AVALU), NA_real_, ceiling(as.numeric(lubridate::dyears(AVAL), \"days\"))), ADTM = dplyr::if_else( is.na(AVALU), lubridate::as_datetime(NA), patient_info$TRTSDTM + lubridate::days(ADY) ) ) } adaette <- split(adsl, adsl$USUBJID) %>% lapply(function(patient_info) { patient_data <- random_patient_data(patient_info) lookup_arm <- lookup_adaette %>% dplyr::filter(.data$ARM == as.character(patient_info$ARMCD)) ae_data <- split(lookup_arm, lookup_arm$CATCD) %>% lapply(random_ae_data, patient_data = patient_data, patient_info = patient_info) %>% Reduce(rbind, .) dplyr::bind_rows(patient_data, ae_data) }) %>% Reduce(rbind, .) adaette <- rbind(adaette, adaette_hy) tmc_ex_adaette <- adsl %>% dplyr::inner_join( dplyr::select(adaette, -\"SITEID\", -\"ARM\"), by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::group_by(.data$USUBJID) %>% dplyr::arrange(.data$ADTM) %>% dplyr::mutate(PARAM = as.factor(.data$PARAM)) %>% dplyr::mutate(PARAMCD = as.factor(.data$PARAMCD)) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_adaette)[is.na(col_labels(tmc_ex_adaette))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adaette[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adaette, file = \"data/tmc_ex_adaette.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adcm","dir":"Articles","previous_headings":"","what":"ADCM","title":"Example Data Generation","text":"","code":"generate_adcm <- function(adsl = tmc_ex_adsl, max_n_cms = 5L) { set.seed(1) lookup_cm <- tibble::tribble( ~CMCLAS, ~CMDECOD, ~ATIREL, \"medcl A\", \"medname A_1/3\", \"PRIOR\", \"medcl A\", \"medname A_2/3\", \"CONCOMITANT\", \"medcl A\", \"medname A_3/3\", \"CONCOMITANT\", \"medcl B\", \"medname B_1/4\", \"CONCOMITANT\", \"medcl B\", \"medname B_2/4\", \"PRIOR\", \"medcl B\", \"medname B_3/4\", \"PRIOR\", \"medcl B\", \"medname B_4/4\", \"CONCOMITANT\", \"medcl C\", \"medname C_1/2\", \"CONCOMITANT\", \"medcl C\", \"medname C_2/2\", \"CONCOMITANT\" ) adcm <- Map(function(id, sid) { n_cms <- sample(c(0, seq_len(max_n_cms)), 1) i <- sample(seq_len(nrow(lookup_cm)), n_cms, TRUE) dplyr::mutate( lookup_cm[i, ], USUBJID = id, STUDYID = sid ) }, adsl$USUBJID, adsl$STUDYID) %>% Reduce(rbind, .) %>% `[`(c(4, 5, 1, 2, 3)) %>% dplyr::mutate(CMCAT = .data$CMCLAS %>% with_label(\"Category for Medication\")) # merge adsl to be able to add CM date and study day variables adcm <- dplyr::inner_join( adcm, adsl, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::mutate(ASTDY = ceiling(difftime(ASTDTM, TRTSDTM, units = \"days\"))) %>% # add 1 to end of range incase both values passed to sample() are the same dplyr::mutate(AENDTM = sample( seq(lubridate::as_datetime(ASTDTM), lubridate::as_datetime(TRTENDT + 1), by = \"day\"), size = 1 )) %>% dplyr::mutate(AENDY = ceiling(difftime(AENDTM, TRTSDTM, units = \"days\"))) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(STUDYID, USUBJID, ASTDTM) tmc_ex_adcm <- adcm %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(CMSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$CMSEQ) %>% dplyr::mutate( ATC1 = paste(\"ATCCLAS1\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 1 Text\"), ATC2 = paste(\"ATCCLAS2\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 2 Text\"), ATC3 = paste(\"ATCCLAS3\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 3 Text\"), ATC4 = paste(\"ATCCLAS4\", substr(.data$CMDECOD, 9, 9)) %>% with_label(\"ATC Level 4 Text\") ) %>% dplyr::mutate( CMINDC = sample(c( \"Nausea\", \"Hypertension\", \"Urticaria\", \"Fever\", \"Asthma\", \"Infection\", \"Diabete\", \"Diarrhea\", \"Pneumonia\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Indication\"), CMDOSE = sample(1:99, dplyr::n(), replace = TRUE) %>% with_label(\"Dose per Administration\"), CMTRT = substr(.data$CMDECOD, 9, 13) %>% with_label(\"Reported Name of Drug, Med, or Therapy\"), CMDOSU = sample(c( \"ug/mL\", \"ug/kg/day\", \"%\", \"uL\", \"DROP\", \"umol/L\", \"mg\", \"mg/breath\", \"ug\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Dose Units\") ) %>% dplyr::mutate( CMROUTE = sample(c( \"INTRAVENOUS\", \"ORAL\", \"NASAL\", \"INTRAMUSCULAR\", \"SUBCUTANEOUS\", \"INHALED\", \"RECTAL\", \"UNKNOWN\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Route of Administration\"), CMDOSFRQ = sample(c( \"Q4W\", \"QN\", \"Q4H\", \"UNKNOWN\", \"TWICE\", \"Q4H\", \"QD\", \"TID\", \"4 TIMES PER MONTH\" ), dplyr::n(), replace = TRUE) %>% with_label(\"Dosing Frequency per Interval\") ) %>% col_relabel( CMCLAS = \"Medication Class\", CMDECOD = \"Standardized Medication Name\", ATIREL = \"Time Relation of Medication\", CMSEQ = \"Sponsor-Defined Identifier\" ) i_lbls <- sapply( names(col_labels(tmc_ex_adcm)[is.na(col_labels(tmc_ex_adcm))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adcm[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adcm, file = \"data/tmc_ex_adcm.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adeg","dir":"Articles","previous_headings":"","what":"ADEG","title":"Example Data Generation","text":"","code":"generate_adeg <- function(adsl = tmc_ex_adsl, n_assessments = 3L, n_days = 3L, max_n_eg = 3L) { set.seed(1) param <- c(\"QT Duration\", \"RR Duration\", \"Heart Rate\", \"ECG Interpretation\") paramcd <- c(\"QT\", \"RR\", \"HR\", \"ECGINTP\") paramu <- c(\"msec\", \"msec\", \"beats/min\", \"\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) adeg <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), stringsAsFactors = FALSE ) adeg$PARAMCD <- as.factor(rel_var( df = adeg, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) adeg <- adeg %>% dplyr::mutate(AVAL = dplyr::case_when( .data$PARAMCD == \"QT\" ~ stats::rnorm(nrow(adeg), mean = 350, sd = 100), .data$PARAMCD == \"RR\" ~ stats::rnorm(nrow(adeg), mean = 1050, sd = 300), .data$PARAMCD == \"HR\" ~ stats::rnorm(nrow(adeg), mean = 70, sd = 20), .data$PARAMCD == \"ECGINTP\" ~ NA_real_ )) adeg <- adeg %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ )) adeg$AVALU <- as.factor(rel_var( df = adeg, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) adeg <- adeg[order(adeg$STUDYID, adeg$USUBJID, adeg$PARAMCD, adeg$AVISITN), ] adeg <- Reduce(rbind, lapply(split(adeg, adeg$USUBJID), function(x) { x$STUDYID <- adsl$STUDYID[which(adsl$USUBJID == x$USUBJID[1])] x$ABLFL <- ifelse(toupper(visit_format) == \"WEEK\" & x$AVISIT == \"BASELINE\", \"Y\", ifelse(toupper(visit_format) == \"CYCLE\" & x$AVISIT == \"CYCLE 1 DAY 1\", \"Y\", \"\") ) x })) adeg$BASE <- ifelse(adeg$AVISITN >= 0, retain(adeg, adeg$AVAL, adeg$ABLFL == \"Y\"), adeg$AVAL) adeg <- adeg %>% dplyr::mutate(ANRLO = dplyr::case_when( .data$PARAMCD == \"QT\" ~ 200, .data$PARAMCD == \"RR\" ~ 600, .data$PARAMCD == \"HR\" ~ 40, .data$PARAMCD == \"ECGINTP\" ~ NA_real_ )) %>% dplyr::mutate(ANRHI = dplyr::case_when( .data$PARAMCD == \"QT\" ~ 500, .data$PARAMCD == \"RR\" ~ 1500, .data$PARAMCD == \"HR\" ~ 100, .data$PARAMCD == \"ECGINTP\" ~ NA_real_ )) %>% dplyr::mutate(ANRIND = factor(dplyr::case_when( .data$AVAL < .data$ANRLO ~ \"LOW\", .data$AVAL >= .data$ANRLO & .data$AVAL <= .data$ANRHI ~ \"NORMAL\", .data$AVAL > .data$ANRHI ~ \"HIGH\" ))) adeg <- adeg %>% dplyr::mutate(CHG = ifelse(.data$AVISITN > 0, .data$AVAL - .data$BASE, NA)) %>% dplyr::mutate(PCHG = ifelse(.data$AVISITN > 0, 100 * (.data$CHG / .data$BASE), NA)) %>% dplyr::mutate(BASETYPE = \"LAST\") %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::mutate(BNRIND = .data$ANRIND[.data$ABLFL == \"Y\"]) %>% dplyr::ungroup() %>% dplyr::mutate(DTYPE = NA) adeg$ANRIND <- factor(adeg$ANRIND, levels = c(\"LOW\", \"NORMAL\", \"HIGH\")) adeg$BNRIND <- factor(adeg$BNRIND, levels = c(\"LOW\", \"NORMAL\", \"HIGH\")) adeg <- dplyr::inner_join( adsl, adeg, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::ungroup() %>% dplyr::group_by(USUBJID) %>% dplyr::arrange(USUBJID, AVISITN) %>% dplyr::mutate(ADTM = rep( sort(sample( seq(lubridate::as_datetime(TRTSDTM[1]), lubridate::as_datetime(TRTENDT[1]), by = \"day\"), size = nlevels(AVISIT) )), each = n() / nlevels(AVISIT) )) %>% dplyr::ungroup() %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) adeg <- adeg %>% dplyr::group_by(.data$USUBJID) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISITN, .data$DTYPE, .data$ADTM ) adeg <- adeg %>% dplyr::mutate(ONTRTFL = factor(dplyr::case_when( is.na(.data$TRTSDTM) ~ \"\", is.na(.data$ADTM) ~ \"Y\", (.data$ADTM < .data$TRTSDTM) ~ \"\", (.data$ADTM > .data$TRTEDTM) ~ \"\", TRUE ~ \"Y\" ))) %>% dplyr::mutate(AVALC = ifelse( .data$PARAMCD == \"ECGINTP\", as.character(sample_fct(c(\"ABNORMAL\", \"NORMAL\"), nrow(adeg), prob = c(0.25, 0.75))), as.character(.data$AVAL) )) adeg <- adeg %>% dplyr::mutate(row_check = seq_len(nrow(adeg))) get_groups <- function(data, minimum) { data <- data %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::arrange(.data$ADTM) %>% dplyr::filter( (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) %>% { if (minimum == TRUE) { dplyr::filter(., .data$AVAL == min(.data$AVAL)) %>% dplyr::mutate(., DTYPE = \"MINIMUM\", AVISIT = \"POST-BASELINE MINIMUM\") } else { dplyr::filter(., .data$AVAL == max(.data$AVAL)) %>% dplyr::mutate(., DTYPE = \"MAXIMUM\", AVISIT = \"POST-BASELINE MAXIMUM\") } } %>% dplyr::slice(1) %>% dplyr::ungroup() return(data) } lbls <- col_labels(adeg) adeg <- rbind(adeg, get_groups(adeg, TRUE), get_groups(adeg, FALSE)) %>% dplyr::arrange(.data$row_check) %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::arrange(.data$AVISIT, .by_group = TRUE) %>% dplyr::ungroup() col_labels(adeg) <- lbls adeg <- adeg[, -which(names(adeg) %in% c(\"row_check\"))] flag_variables <- function(data, worst_obs) { data_compare <- data %>% dplyr::mutate(row_check = seq_len(nrow(data))) data <- data_compare %>% { if (worst_obs == FALSE) { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISIT) %>% dplyr::arrange(., .data$ADTM) } else { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE) } } %>% dplyr::filter( .data$AVISITN > 0 & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) & is.na(.data$DTYPE) ) %>% { if (worst_obs == TRUE) { dplyr::arrange(., .data$AVALC) %>% dplyr::filter(., ifelse( .data$PARAMCD == \"ECGINTP\", ifelse(.data$AVALC == \"ABNORMAL\", .data$AVALC == \"ABNORMAL\", .data$AVALC == \"NORMAL\"), .data$AVAL == min(.data$AVAL) )) } else { dplyr::filter(., ifelse( .data$PARAMCD == \"ECGINTP\", .data$AVALC == \"ABNORMAL\" | .data$AVALC == \"NORMAL\", .data$AVAL == min(.data$AVAL) )) } } %>% dplyr::slice(1) %>% { if (worst_obs == TRUE) { dplyr::mutate(., new_var = dplyr::case_when( (.data$AVALC == \"ABNORMAL\" | .data$AVALC == \"NORMAL\") ~ \"Y\", (!is.na(.data$AVAL) & is.na(.data$DTYPE)) ~ \"Y\", TRUE ~ \"\" )) } else { dplyr::mutate(., new_var = dplyr::case_when( (.data$AVALC == \"ABNORMAL\" | .data$AVALC == \"NORMAL\") ~ \"Y\", (!is.na(.data$AVAL) & is.na(.data$DTYPE)) ~ \"Y\", TRUE ~ \"\" )) } } %>% dplyr::ungroup() data_compare$new_var <- ifelse(data_compare$row_check %in% data$row_check, \"Y\", \"\") data_compare <- data_compare[, -which(names(data_compare) %in% c(\"row_check\"))] return(data_compare) } adeg <- flag_variables(adeg, FALSE) %>% dplyr::rename(WORS01FL = \"new_var\") adeg <- flag_variables(adeg, TRUE) %>% dplyr::rename(WORS02FL = \"new_var\") tmc_ex_adeg <- adeg %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::mutate(BASEC = ifelse( .data$PARAMCD == \"ECGINTP\", .data$AVALC[.data$AVISIT == \"BASELINE\"], as.character(.data$BASE) )) %>% dplyr::ungroup() %>% col_relabel(BASEC = \"Baseline Character Value\") i_lbls <- sapply( names(col_labels(tmc_ex_adeg)[is.na(col_labels(tmc_ex_adeg))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adeg[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adeg, file = \"data/tmc_ex_adeg.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adex","dir":"Articles","previous_headings":"","what":"ADEX","title":"Example Data Generation","text":"","code":"generate_adex <- function(adsl = tmc_ex_adsl, n_assessments = 3L, n_days = 3L, max_n_exs = 3L) { set.seed(1) param <- c( \"Dose administered during constant dosing interval\", \"Number of doses administered during constant dosing interval\", \"Total dose administered\", \"Total number of doses administered\" ) paramcd <- c(\"DOSE\", \"NDOSE\", \"TDOSE\", \"TNDOSE\") paramu <- c(\"mg\", \" \", \"mg\", \" \") parcat1 <- c(\"INDIVIDUAL\", \"OVERALL\") parcat2 <- c(\"Drug A\", \"Drug B\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) adex <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = c( rep( param_init_list$relvar1[1], length(levels(visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days))) ), rep( param_init_list$relvar1[2], length(levels(visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days))) ), param_init_list$relvar1[3:4] ), stringsAsFactors = FALSE ) adex$PARAMCD <- as.factor(rel_var( df = adex, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) adex$AVALU <- as.factor(rel_var( df = adex, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) adex <- adex %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(PARCAT_ind = sample(c(1, 2), size = 1)) %>% dplyr::mutate(PARCAT2 = ifelse(.data$PARCAT_ind == 1, parcat2[1], parcat2[2])) %>% dplyr::select(-\"PARCAT_ind\") adex <- adex %>% dplyr::mutate(PARCAT1 = dplyr::case_when( (.data$PARAMCD == \"TNDOSE\" | .data$PARAMCD == \"TDOSE\") ~ \"OVERALL\", .data$PARAMCD == \"DOSE\" | .data$PARAMCD == \"NDOSE\" ~ \"INDIVIDUAL\" )) adex_visit <- adex %>% dplyr::filter(.data$PARAMCD == \"DOSE\" | .data$PARAMCD == \"NDOSE\") %>% dplyr::mutate( AVISIT = rep(visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), 2) ) adex <- dplyr::left_join( adex %>% dplyr::group_by( .data$USUBJID, .data$STUDYID, .data$PARAM, .data$PARAMCD, .data$AVALU, .data$PARCAT1, .data$PARCAT2 ) %>% dplyr::mutate(id = dplyr::row_number()), adex_visit %>% dplyr::group_by( .data$USUBJID, .data$STUDYID, .data$PARAM, .data$PARAMCD, .data$AVALU, .data$PARCAT1, .data$PARCAT2 ) %>% dplyr::mutate(id = dplyr::row_number()), by = c(\"USUBJID\", \"STUDYID\", \"PARCAT1\", \"PARCAT2\", \"id\", \"PARAMCD\", \"PARAM\", \"AVALU\") ) %>% dplyr::select(-\"id\") adex <- adex %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ 999000 )) adex2 <- split(adex, adex$USUBJID) %>% lapply(function(pinfo) { pinfo %>% dplyr::filter(.data$PARAMCD == \"DOSE\") %>% dplyr::group_by(.data$USUBJID, .data$PARCAT2, .data$AVISIT) %>% dplyr::mutate(changeind = dplyr::case_when( .data$AVISIT == \"SCREENING\" ~ 0, .data$AVISIT != \"SCREENING\" ~ sample(c(-1, 0, 1), size = 1, prob = c(0.25, 0.5, 0.25), replace = TRUE ) )) %>% dplyr::ungroup() %>% dplyr::group_by(.data$USUBJID, .data$PARCAT2) %>% dplyr::mutate( csum = cumsum(.data$changeind), changeind = dplyr::case_when( .data$csum <= -3 ~ sample(c(0, 1), size = 1, prob = c(0.5, 0.5)), .data$csum >= 3 ~ sample(c(0, -1), size = 1, prob = c(0.5, 0.5)), TRUE ~ .data$changeind ) ) %>% dplyr::mutate(csum = cumsum(.data$changeind)) %>% dplyr::ungroup() %>% dplyr::group_by(.data$USUBJID, .data$PARCAT2, .data$AVISIT) %>% dplyr::mutate(AVAL = dplyr::case_when( .data$csum == -2 ~ 480, .data$csum == -1 ~ 720, .data$csum == 0 ~ 960, .data$csum == 1 ~ 1200, .data$csum == 2 ~ 1440 )) %>% dplyr::select(-c(\"csum\", \"changeind\")) %>% dplyr::ungroup() }) %>% Reduce(rbind, .) adextmp <- dplyr::full_join(adex2, adex, by = names(adex)) adex <- adextmp %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(AVAL = ifelse(.data$PARAMCD == \"NDOSE\", 1, .data$AVAL)) %>% dplyr::mutate(AVAL = ifelse( .data$PARAMCD == \"TNDOSE\", sum(.data$AVAL[.data$PARAMCD == \"NDOSE\"]), .data$AVAL )) %>% dplyr::ungroup() %>% dplyr::group_by(.data$USUBJID, .data$STUDYID, .data$PARCAT2) %>% dplyr::mutate(AVAL = ifelse( .data$PARAMCD == \"TDOSE\", sum(.data$AVAL[.data$PARAMCD == \"DOSE\"]), .data$AVAL )) adex <- dplyr::inner_join(adsl, adex, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\") %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM) adex <- adex %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(EXSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ASTDTM, .data$AVISITN ) %>% col_relabel( PARCAT1 = \"Parameter Category (Individual/Overall)\", PARCAT2 = \"Parameter Category (Drug A/Drug B)\", EXSEQ = \"Analysis Sequence Number\" ) visit_levels <- str_extract(levels(adex$AVISIT), pattern = \"[0-9]+\") vl_extracted <- vapply(visit_levels, function(x) as.numeric(x[2]), numeric(1)) vl_extracted <- c(-1, 1, vl_extracted[!is.na(vl_extracted)]) tmc_ex_adex <- adex %>% dplyr::mutate(VISITDY = as.numeric(as.character(factor(AVISIT, labels = vl_extracted)))) %>% dplyr::mutate(ASTDTM = lubridate::as_datetime(TRTSDTM) + lubridate::days(VISITDY)) %>% dplyr::distinct(USUBJID, .keep_all = TRUE) i_lbls <- sapply( names(col_labels(tmc_ex_adex)[is.na(col_labels(tmc_ex_adex))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adex[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adex, file = \"data/tmc_ex_adex.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adlb","dir":"Articles","previous_headings":"","what":"ADLB","title":"Example Data Generation","text":"","code":"generate_adlb <- function(adsl = tmc_ex_adsl, n_assessments = 3L, n_days = 3L, max_n_lbs = 3L) { set.seed(1) lbcat <- c(\"CHEMISTRY\", \"CHEMISTRY\", \"IMMUNOLOGY\") param <- c( \"Alanine Aminotransferase Measurement\", \"C-Reactive Protein Measurement\", \"Immunoglobulin A Measurement\" ) paramcd <- c(\"ALT\", \"CRP\", \"IGA\") paramu <- c(\"U/L\", \"mg/L\", \"g/L\") aval_mean <- c(20, 1, 2) visit_format <- \"WEEK\" # validate and initialize related variables lbcat_init_list <- relvar_init(param, lbcat) param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) adlb <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), stringsAsFactors = FALSE ) # assign AVAL based on different test adlb <- adlb %>% dplyr::mutate(AVAL = stats::rnorm(nrow(adlb), mean = 1, sd = 0.2)) %>% dplyr::left_join(data.frame(PARAM = param, ADJUST = aval_mean), by = \"PARAM\") %>% dplyr::mutate(AVAL = .data$AVAL * .data$ADJUST) %>% dplyr::select(-\"ADJUST\") # assign related variable values: PARAMxLBCAT are related adlb$LBCAT <- as.factor(rel_var( df = adlb, var_name = \"LBCAT\", var_values = lbcat_init_list$relvar2, related_var = \"PARAM\" )) # assign related variable values: PARAMxPARAMCD are related adlb$PARAMCD <- as.factor(rel_var( df = adlb, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) adlb$AVALU <- as.factor(rel_var( df = adlb, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) adlb <- adlb %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ )) adlb <- adlb %>% dplyr::mutate(AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ )) # order to prepare for change from screening and baseline values adlb <- adlb[order(adlb$STUDYID, adlb$USUBJID, adlb$PARAMCD, adlb$AVISITN), ] adlb <- Reduce(rbind, lapply(split(adlb, adlb$USUBJID), function(x) { x$STUDYID <- adsl$STUDYID[which(adsl$USUBJID == x$USUBJID[1])] x$ABLFL2 <- ifelse(x$AVISIT == \"SCREENING\", \"Y\", \"\") x$ABLFL <- ifelse(toupper(visit_format) == \"WEEK\" & x$AVISIT == \"BASELINE\", \"Y\", ifelse(toupper(visit_format) == \"CYCLE\" & x$AVISIT == \"CYCLE 1 DAY 1\", \"Y\", \"\") ) x })) adlb$BASE <- ifelse(adlb$ABLFL2 != \"Y\", retain(adlb, adlb$AVAL, adlb$ABLFL == \"Y\"), NA) anrind_choices <- c(\"HIGH\", \"LOW\", \"NORMAL\") adlb <- adlb %>% dplyr::mutate(BASETYPE = \"LAST\") %>% dplyr::mutate(ANRIND = sample_fct(anrind_choices, nrow(adlb), prob = c(0.1, 0.1, 0.8))) %>% dplyr::mutate(ANRLO = dplyr::case_when( .data$PARAMCD == \"ALT\" ~ 7, .data$PARAMCD == \"CRP\" ~ 8, .data$PARAMCD == \"IGA\" ~ 0.8 )) %>% dplyr::mutate(ANRHI = dplyr::case_when( .data$PARAMCD == \"ALT\" ~ 55, .data$PARAMCD == \"CRP\" ~ 10, .data$PARAMCD == \"IGA\" ~ 3 )) %>% dplyr::mutate(DTYPE = NA) %>% dplyr::mutate( ATOXGR = factor(dplyr::case_when( .data$ANRIND == \"LOW\" ~ sample( c(\"-1\", \"-2\", \"-3\", \"-4\", \"-5\"), nrow(adlb), replace = TRUE, prob = c(0.30, 0.25, 0.20, 0.15, 0) ), .data$ANRIND == \"HIGH\" ~ sample( c(\"1\", \"2\", \"3\", \"4\", \"5\"), nrow(adlb), replace = TRUE, prob = c(0.30, 0.25, 0.20, 0.15, 0) ), .data$ANRIND == \"NORMAL\" ~ \"0\" )) %>% with_label(\"Analysis Toxicity Grade\") ) %>% dplyr::group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% dplyr::mutate(BTOXGR = .data$ATOXGR[.data$ABLFL == \"Y\"]) %>% dplyr::ungroup() %>% col_relabel(BTOXGR = \"Baseline Toxicity Grade\") # High and low descriptions of the different PARAMCD values # This is currently hard coded as the GDSR does not have these descriptions yet grade_lookup <- tibble::tribble( ~PARAMCD, ~ATOXDSCL, ~ATOXDSCH, \"ALB\", \"Hypoalbuminemia\", NA_character_, \"ALKPH\", NA_character_, \"Alkaline phosphatase increased\", \"ALT\", NA_character_, \"Alanine aminotransferase increased\", \"AST\", NA_character_, \"Aspartate aminotransferase increased\", \"BILI\", NA_character_, \"Blood bilirubin increased\", \"CA\", \"Hypocalcemia\", \"Hypercalcemia\", \"CHOLES\", NA_character_, \"Cholesterol high\", \"CK\", NA_character_, \"CPK increased\", \"CREAT\", NA_character_, \"Creatinine increased\", \"CRP\", NA_character_, \"C reactive protein increased\", \"GGT\", NA_character_, \"GGT increased\", \"GLUC\", \"Hypoglycemia\", \"Hyperglycemia\", \"HGB\", \"Anemia\", \"Hemoglobin increased\", \"IGA\", NA_character_, \"Immunoglobulin A increased\", \"POTAS\", \"Hypokalemia\", \"Hyperkalemia\", \"LYMPH\", \"CD4 lymphocytes decreased\", NA_character_, \"PHOS\", \"Hypophosphatemia\", NA_character_, \"PLAT\", \"Platelet count decreased\", NA_character_, \"SODIUM\", \"Hyponatremia\", \"Hypernatremia\", \"WBC\", \"White blood cell decreased\", \"Leukocytosis\", ) # merge grade_lookup onto adlb adlb <- dplyr::left_join(adlb, grade_lookup, by = \"PARAMCD\") # merge adsl to be able to add LB date and study day variables adlb <- dplyr::inner_join( adsl, adlb, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::ungroup() %>% dplyr::group_by(USUBJID) %>% dplyr::arrange(USUBJID, AVISITN) %>% dplyr::mutate(ADTM = rep( sort(sample( seq(lubridate::as_datetime(TRTSDTM[1]), lubridate::as_datetime(TRTENDT[1]), by = \"day\"), size = nlevels(AVISIT) )), each = n() / nlevels(AVISIT) )) %>% dplyr::ungroup() %>% dplyr::select(-TRTENDT) %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) adlb <- adlb %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(LBSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISITN, .data$DTYPE, .data$ADTM, .data$LBSEQ ) %>% col_relabel(LBSEQ = \"Lab Test or Examination Sequence Number\") adlb <- adlb %>% dplyr::mutate(ONTRTFL = factor(dplyr::case_when( is.na(.data$TRTSDTM) ~ \"\", is.na(.data$ADTM) ~ \"Y\", (.data$ADTM < .data$TRTSDTM) ~ \"\", (.data$ADTM > .data$TRTEDTM) ~ \"\", TRUE ~ \"Y\" ))) flag_variables <- function(data, apply_grouping, apply_filter, apply_mutate) { data_compare <- data %>% dplyr::mutate(row_check = seq_len(nrow(data))) data <- data_compare %>% { if (apply_grouping == TRUE) { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE, .data$AVISIT) } else { dplyr::group_by(., .data$USUBJID, .data$PARAMCD, .data$BASETYPE) } } %>% dplyr::arrange(.data$ADTM, .data$LBSEQ) %>% { if (apply_filter == TRUE) { dplyr::filter( ., (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) %>% dplyr::filter(.data$ATOXGR == max(as.numeric(as.character(.data$ATOXGR)))) } else if (apply_filter == FALSE) { dplyr::filter( ., (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) %>% dplyr::filter(.data$ATOXGR == min(as.numeric(as.character(.data$ATOXGR)))) } else { dplyr::filter( ., .data$AVAL == min(.data$AVAL) & (.data$AVISIT != \"BASELINE\" & .data$AVISIT != \"SCREENING\") & (.data$ONTRTFL == \"Y\" | .data$ADTM <= .data$TRTSDTM) ) } } %>% dplyr::slice(1) %>% { if (apply_mutate == TRUE) { dplyr::mutate(., new_var = ifelse(is.na(.data$DTYPE), \"Y\", \"\")) } else { dplyr::mutate(., new_var = ifelse(is.na(.data$AVAL) == FALSE & is.na(.data$DTYPE), \"Y\", \"\")) } } %>% dplyr::ungroup() data_compare$new_var <- ifelse(data_compare$row_check %in% data$row_check, \"Y\", \"\") data_compare <- data_compare[, -which(names(data_compare) %in% c(\"row_check\"))] return(data_compare) } adlb <- flag_variables(adlb, TRUE, \"ELSE\", FALSE) %>% dplyr::rename(WORS01FL = \"new_var\") adlb <- flag_variables(adlb, FALSE, TRUE, TRUE) %>% dplyr::rename(WGRHIFL = \"new_var\") adlb <- flag_variables(adlb, FALSE, FALSE, TRUE) %>% dplyr::rename(WGRLOFL = \"new_var\") adlb <- flag_variables(adlb, TRUE, TRUE, TRUE) %>% dplyr::rename(WGRHIVFL = \"new_var\") adlb <- flag_variables(adlb, TRUE, FALSE, TRUE) %>% dplyr::rename(WGRLOVFL = \"new_var\") tmc_ex_adlb <- adlb %>% dplyr::mutate( ANL01FL = ifelse( (.data$ABLFL == \"Y\" | (.data$WORS01FL == \"Y\" & is.na(.data$DTYPE))) & (.data$AVISIT != \"SCREENING\"), \"Y\", \"\" ) %>% with_label(\"Analysis Flag 01 Baseline Post-Baseline\"), PARAM = as.factor(.data$PARAM) ) tmc_ex_adlb <- tmc_ex_adlb %>% group_by(.data$USUBJID, .data$PARAMCD, .data$BASETYPE) %>% mutate(BNRIND = .data$ANRIND[.data$ABLFL == \"Y\"]) %>% ungroup() %>% dplyr::mutate(ADY = ceiling(as.numeric(difftime(.data$ADTM, .data$TRTSDTM, units = \"days\")))) tmc_ex_adlb$PARAMCD <- as.factor(tmc_ex_adlb$PARAMCD) tmc_ex_adlb <- tmc_ex_adlb %>% dplyr::mutate(CHG = .data$AVAL - .data$BASE) %>% dplyr::mutate(PCHG = 100 * (.data$CHG / .data$BASE)) %>% col_relabel( LBCAT = \"Category for Lab Test\", ATOXDSCL = \"Analysis Toxicity Description Low\", ATOXDSCH = \"Analysis Toxicity Description High\", WGRHIFL = \"Worst High Grade per Patient\", WGRLOFL = \"Worst Low Grade per Patient\", WGRHIVFL = \"Worst High Grade per Patient per Visit\", WGRLOVFL = \"Worst Low Grade per Patient per Visit\" ) i_lbls <- sapply( names(col_labels(tmc_ex_adlb)[is.na(col_labels(tmc_ex_adlb))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adlb[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adlb, file = \"data/tmc_ex_adlb.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"admh","dir":"Articles","previous_headings":"","what":"ADMH","title":"Example Data Generation","text":"","code":"generate_admh <- function(adsl = tmc_ex_adsl, max_n_mhs = 10L) { set.seed(1) lookup_mh <- tibble::tribble( ~MHBODSYS, ~MHDECOD, ~MHSOC, \"cl A\", \"trm A_1/2\", \"cl A\", \"cl A\", \"trm A_2/2\", \"cl A\", \"cl B\", \"trm B_1/3\", \"cl B\", \"cl B\", \"trm B_2/3\", \"cl B\", \"cl B\", \"trm B_3/3\", \"cl B\", \"cl C\", \"trm C_1/2\", \"cl C\", \"cl C\", \"trm C_2/2\", \"cl C\", \"cl D\", \"trm D_1/3\", \"cl D\", \"cl D\", \"trm D_2/3\", \"cl D\", \"cl D\", \"trm D_3/3\", \"cl D\" ) admh <- Map( function(id, sid) { n_mhs <- sample(0:max_n_mhs, 1) i <- sample(seq_len(nrow(lookup_mh)), n_mhs, TRUE) dplyr::mutate( lookup_mh[i, ], USUBJID = id, STUDYID = sid ) }, adsl$USUBJID, adsl$STUDYID ) %>% Reduce(rbind, .) %>% `[`(c(4, 5, 1, 2, 3)) %>% dplyr::mutate(MHTERM = .data$MHDECOD %>% with_label(\"Reported Term for the Medical History\")) admh <- dplyr::inner_join( adsl, admh, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ASTDTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM, .data$MHTERM) %>% dplyr::mutate(MHDISTAT = sample( x = c(\"Resolved\", \"Ongoing with treatment\", \"Ongoing without treatment\"), prob = c(0.6, 0.2, 0.2), size = dplyr::n(), replace = TRUE ) %>% with_label(\"Status of Disease\")) tmc_ex_admh <- admh %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(MHSEQ = seq_len(dplyr::n())) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ASTDTM) %>% col_relabel( MHBODSYS = \"Body System or Organ Class\", MHDECOD = \"Dictionary-Derived Term\", MHSOC = \"Primary System Organ Class\", MHSEQ = \"Sponsor-Defined Identifier\" ) i_lbls <- sapply( names(col_labels(tmc_ex_admh)[is.na(col_labels(tmc_ex_admh))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_admh[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_admh, file = \"data/tmc_ex_admh.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adqs","dir":"Articles","previous_headings":"","what":"ADQS","title":"Example Data Generation","text":"","code":"generate_adqs <- function(adsl = tmc_ex_adsl, n_assessments = 5L, n_days = 5L) { set.seed(1) param <- c( \"BFI All Questions\", \"Fatigue Interference\", \"Function/Well-Being (GF1,GF3,GF7)\", \"Treatment Side Effects (GP2,C5,GP5)\", \"FKSI-19 All Questions\" ) paramcd <- c(\"BFIALL\", \"FATIGI\", \"FKSI-FWB\", \"FKSI-TSE\", \"FKSIALL\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) adqs <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = param_init_list$relvar1, AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments, n_days = n_days), stringsAsFactors = FALSE ) adqs <- dplyr::mutate( adqs, AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ ) ) adqs$PARAMCD <- rel_var(df = adqs, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\") adqs$AVAL <- stats::rnorm(nrow(adqs), mean = 50, sd = 8) + adqs$AVISITN * stats::rnorm(nrow(adqs), mean = 5, sd = 2) adqs <- adqs[order(adqs$STUDYID, adqs$USUBJID, adqs$PARAMCD, adqs$AVISITN), ] adqs <- Reduce( rbind, lapply( split(adqs, adqs$USUBJID), function(x) { x$STUDYID <- adsl$STUDYID[which(adsl$USUBJID == x$USUBJID[1])] x$ABLFL2 <- ifelse(x$AVISIT == \"SCREENING\", \"Y\", \"\") x$ABLFL <- ifelse( toupper(visit_format) == \"WEEK\" & x$AVISIT == \"BASELINE\", \"Y\", ifelse( toupper(visit_format) == \"CYCLE\" & x$AVISIT == \"CYCLE 1 DAY 1\", \"Y\", \"\" ) ) x } ) ) adqs$BASE <- ifelse(adqs$ABLFL2 != \"Y\", retain(adqs, adqs$AVAL, adqs$ABLFL == \"Y\"), NA) adqs <- adqs %>% dplyr::mutate(CHG = .data$AVAL - .data$BASE) adqs <- dplyr::inner_join( adsl, adqs, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% ungroup() %>% group_by(USUBJID) %>% arrange(USUBJID, AVISITN) %>% dplyr::mutate(ADTM = rep( sort(sample( seq(lubridate::as_datetime(TRTSDTM[1]), lubridate::as_datetime(TRTENDT[1]), by = \"day\"), size = nlevels(AVISIT) )), each = n() / nlevels(AVISIT) )) %>% dplyr::ungroup() %>% dplyr::select(-TRTENDT) %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) tmc_ex_adqs <- adqs %>% dplyr::group_by(.data$USUBJID) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$AVISITN, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_adqs)[is.na(col_labels(tmc_ex_adqs))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adqs[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adqs, file = \"data/tmc_ex_adqs.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adrs","dir":"Articles","previous_headings":"","what":"ADRS","title":"Example Data Generation","text":"","code":"generate_adrs <- function(adsl = tmc_ex_adsl) { set.seed(1) param_codes <- stats::setNames(1:5, c(\"CR\", \"PR\", \"SD\", \"PD\", \"NE\")) lookup_ars <- expand.grid( ARM = c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), AVALC = names(param_codes) ) %>% dplyr::mutate( AVAL = param_codes[.data$AVALC], p_scr = c(rep(0, 3), rep(0, 3), c(1, 1, 1), c(0, 0, 0), c(0, 0, 0)), p_bsl = c(rep(0, 3), rep(0, 3), c(1, 1, 1), c(0, 0, 0), c(0, 0, 0)), p_cycle = c(c(.35, .25, .4), c(.30, .20, .20), c(.2, .25, .3), c(.14, 0.20, 0.18), c(.01, 0.1, 0.02)), p_eoi = c(c(.35, .25, .4), c(.30, .20, .20), c(.2, .25, .3), c(.14, 0.20, 0.18), c(.01, 0.1, 0.02)), p_fu = c(c(.25, .15, .3), c(.15, .05, .25), c(.3, .25, .3), c(.3, .55, .25), rep(0, 3)) ) adrs <- split(adsl, adsl$USUBJID) %>% lapply(function(pinfo) { probs <- dplyr::filter(lookup_ars, .data$ARM == as.character(pinfo$ACTARM)) # screening rsp_screen <- sample(probs$AVALC, 1, prob = probs$p_scr) %>% as.character() # baseline rsp_bsl <- sample(probs$AVALC, 1, prob = probs$p_bsl) %>% as.character() # cycle rsp_c2d1 <- sample(probs$AVALC, 1, prob = probs$p_cycle) %>% as.character() rsp_c4d1 <- sample(probs$AVALC, 1, prob = probs$p_cycle) %>% as.character() # end of induction rsp_eoi <- sample(probs$AVALC, 1, prob = probs$p_eoi) %>% as.character() # follow up rsp_fu <- sample(probs$AVALC, 1, prob = probs$p_fu) %>% as.character() best_rsp <- min(param_codes[c(rsp_screen, rsp_bsl, rsp_eoi, rsp_fu, rsp_c2d1, rsp_c4d1)]) best_rsp_i <- which.min(param_codes[c(rsp_screen, rsp_bsl, rsp_eoi, rsp_fu, rsp_c2d1, rsp_c4d1)]) avisit <- c(\"SCREENING\", \"BASELINE\", \"CYCLE 2 DAY 1\", \"CYCLE 4 DAY 1\", \"END OF INDUCTION\", \"FOLLOW UP\") # meaningful date information TRTSTDT <- lubridate::date(pinfo$TRTSDTM) TRTENDT <- lubridate::date(dplyr::if_else( !is.na(pinfo$TRTEDTM), pinfo$TRTEDTM, lubridate::floor_date(TRTSTDT + study_duration_secs, unit = \"day\") )) scr_date <- TRTSTDT - lubridate::days(100) bs_date <- TRTSTDT flu_date <- sample(seq(lubridate::as_datetime(TRTSTDT), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1) eoi_date <- sample(seq(lubridate::as_datetime(TRTSTDT), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1) c2d1_date <- sample(seq(lubridate::as_datetime(TRTSTDT), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1) c4d1_date <- min(lubridate::date(c2d1_date + lubridate::days(60)), TRTENDT) tibble::tibble( STUDYID = pinfo$STUDYID, USUBJID = pinfo$USUBJID, PARAMCD = as.factor(c(rep(\"OVRINV\", 6), \"BESRSPI\", \"INVET\")), PARAM = as.factor(dplyr::recode( .data$PARAMCD, OVRINV = \"Overall Response by Investigator - by visit\", OVRSPI = \"Best Overall Response by Investigator (no confirmation required)\", BESRSPI = \"Best Confirmed Overall Response by Investigator\", INVET = \"Investigator End Of Induction Response\" )), AVALC = c( rsp_screen, rsp_bsl, rsp_c2d1, rsp_c4d1, rsp_eoi, rsp_fu, names(param_codes)[best_rsp], rsp_eoi ), AVAL = param_codes[.data$AVALC], AVISIT = factor(c(avisit, avisit[best_rsp_i], avisit[5]), levels = avisit) ) %>% merge( tibble::tibble( AVISIT = avisit, ADTM = c(scr_date, bs_date, c2d1_date, c4d1_date, eoi_date, flu_date), AVISITN = c(-1, 0, 2, 4, 999, 999), TRTSDTM = pinfo$TRTSDTM ) %>% dplyr::select(-\"TRTSDTM\"), by = \"AVISIT\" ) }) %>% Reduce(rbind, .) %>% dplyr::mutate( AVALC = factor(.data$AVALC, levels = names(param_codes)), DTHFL = factor(sample(c(\"Y\", \"N\"), nrow(.), replace = TRUE, prob = c(1, 0.8))) %>% with_label(\"Death Flag\") ) # merge ADSL to be able to add RS date and study day variables adrs <- dplyr::inner_join( adsl, adrs, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) tmc_ex_adrs <- adrs %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$AVISITN, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_adrs)[is.na(col_labels(tmc_ex_adrs))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adrs[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adrs, file = \"data/tmc_ex_adrs.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"adtte","dir":"Articles","previous_headings":"","what":"ADTTE","title":"Example Data Generation","text":"","code":"generate_adtte <- function(adsl = tmc_ex_adsl) { set.seed(1) lookup_tte <- tibble::tribble( ~ARM, ~PARAMCD, ~PARAM, ~LAMBDA, ~CNSR_P, \"ARM A\", \"OS\", \"Overall Survival\", log(2) / 610, 0.4, \"ARM B\", \"OS\", \"Overall Survival\", log(2) / 490, 0.3, \"ARM C\", \"OS\", \"Overall Survival\", log(2) / 365, 0.2, \"ARM A\", \"PFS\", \"Progression Free Survival\", log(2) / 365, 0.4, \"ARM B\", \"PFS\", \"Progression Free Survival\", log(2) / 305, 0.3, \"ARM C\", \"PFS\", \"Progression Free Survival\", log(2) / 243, 0.2, \"ARM A\", \"EFS\", \"Event Free Survival\", log(2) / 365, 0.4, \"ARM B\", \"EFS\", \"Event Free Survival\", log(2) / 305, 0.3, \"ARM C\", \"EFS\", \"Event Free Survival\", log(2) / 243, 0.2, \"ARM A\", \"CRSD\", \"Duration of Confirmed Response\", log(2) / 305, 0.4, \"ARM B\", \"CRSD\", \"Duration of Confirmed Response\", log(2) / 243, 0.3, \"ARM C\", \"CRSD\", \"Duration of Confirmed Response\", log(2) / 182, 0.2 ) evntdescr_sel <- c( \"Death\", \"Disease Progression\", \"Last Tumor Assessment\", \"Adverse Event\", \"Last Date Known To Be Alive\" ) cnsdtdscr_sel <- c( \"Preferred Term\", \"Clinical Cut Off\", \"Completion or Discontinuation\", \"End of AE Reporting Period\" ) adtte <- split(adsl, adsl$USUBJID) %>% lapply(FUN = function(pinfo) { lookup_tte %>% dplyr::filter(.data$ARM == as.character(pinfo$ACTARMCD)) %>% dplyr::rowwise() %>% dplyr::mutate( STUDYID = pinfo$STUDYID, USUBJID = pinfo$USUBJID, CNSR = sample(c(0, 1), 1, prob = c(1 - .data$CNSR_P, .data$CNSR_P)), AVAL = stats::rexp(1, .data$LAMBDA), AVALU = \"DAYS\", EVNTDESC = if (.data$CNSR == 1) { sample(evntdescr_sel[-c(1:2)], 1) } else { ifelse(.data$PARAMCD == \"OS\", sample(evntdescr_sel[1], 1), sample(evntdescr_sel[c(1:2)], 1) ) } ) %>% dplyr::select(-\"LAMBDA\", -\"CNSR_P\") }) %>% Reduce(rbind, .) # merge ADSL to be able to add TTE date and study day variables adtte <- dplyr::inner_join( adsl, dplyr::select(adtte, -\"ARM\"), by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ADTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) adtte <- adtte %>% dplyr::group_by(.data$USUBJID) %>% dplyr::mutate(PARAM = as.factor(.data$PARAM)) %>% dplyr::mutate(PARAMCD = as.factor(.data$PARAMCD)) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ADTM ) lbls <- col_labels(adtte) # adding adverse event counts and log follow-up time tmc_ex_adtte <- dplyr::bind_rows( adtte, data.frame(adtte %>% dplyr::group_by(.data$USUBJID) %>% dplyr::slice_head(n = 1) %>% dplyr::mutate( PARAMCD = \"TNE\", PARAM = \"Total Number of Exacerbations\", AVAL = stats::rpois(1, 3), AVALU = \"COUNT\", lgTMATRSK = log(stats::rexp(1, rate = 3)), dplyr::across(c(\"ADTM\", \"EVNTDESC\"), ~NA) )) ) %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$ADTM ) col_labels(tmc_ex_adtte) <- c(lbls, lgTMATRSK = \"Log Time At Risk\") i_lbls <- sapply( names(col_labels(tmc_ex_adtte)[is.na(col_labels(tmc_ex_adtte))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_adtte[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_adtte, file = \"data/tmc_ex_adtte.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"advs","dir":"Articles","previous_headings":"","what":"ADVS","title":"Example Data Generation","text":"","code":"generate_advs <- function(adsl = tmc_ex_adsl, n_assessments = 5L, n_days = 5L) { set.seed(1) param <- c( \"Diastolic Blood Pressure\", \"Pulse Rate\", \"Respiratory Rate\", \"Systolic Blood Pressure\", \"Temperature\", \"Weight\" ) paramcd <- c(\"DIABP\", \"PULSE\", \"RESP\", \"SYSBP\", \"TEMP\", \"WEIGHT\") paramu <- c(\"Pa\", \"beats/min\", \"breaths/min\", \"Pa\", \"C\", \"Kg\") visit_format <- \"WEEK\" param_init_list <- relvar_init(param, paramcd) unit_init_list <- relvar_init(param, paramu) advs <- expand.grid( STUDYID = unique(adsl$STUDYID), USUBJID = adsl$USUBJID, PARAM = as.factor(param_init_list$relvar1), AVISIT = visit_schedule(visit_format = visit_format, n_assessments = n_assessments), stringsAsFactors = FALSE ) advs <- dplyr::mutate( advs, AVISITN = dplyr::case_when( AVISIT == \"SCREENING\" ~ -1, AVISIT == \"BASELINE\" ~ 0, (grepl(\"^WEEK\", AVISIT) | grepl(\"^CYCLE\", AVISIT)) ~ as.numeric(AVISIT) - 2, TRUE ~ NA_real_ ) ) advs$PARAMCD <- as.factor(rel_var( df = advs, var_name = \"PARAMCD\", var_values = param_init_list$relvar2, related_var = \"PARAM\" )) advs$AVALU <- as.factor(rel_var( df = advs, var_name = \"AVALU\", var_values = unit_init_list$relvar2, related_var = \"PARAM\" )) advs$AVAL <- stats::rnorm(nrow(advs), mean = 50, sd = 8) advs <- advs[order(advs$STUDYID, advs$USUBJID, advs$PARAMCD, advs$AVISITN), ] advs <- dplyr::inner_join( adsl, advs, by = c(\"STUDYID\", \"USUBJID\"), multiple = \"all\" ) %>% dplyr::rowwise() %>% dplyr::mutate(TRTENDT = lubridate::date(dplyr::case_when( is.na(TRTEDTM) ~ lubridate::floor_date(lubridate::date(TRTSDTM) + study_duration_secs, unit = \"day\"), TRUE ~ TRTEDTM ))) %>% dplyr::mutate(ADTM = sample( seq(lubridate::as_datetime(TRTSDTM), lubridate::as_datetime(TRTENDT), by = \"day\"), size = 1 )) %>% dplyr::mutate(ADY = ceiling(difftime(ADTM, TRTSDTM, units = \"days\"))) %>% dplyr::select(-TRTENDT) %>% dplyr::ungroup() %>% dplyr::arrange(.data$STUDYID, .data$USUBJID, .data$ADTM) tmc_ex_advs <- advs %>% dplyr::group_by(.data$USUBJID) %>% dplyr::ungroup() %>% dplyr::arrange( .data$STUDYID, .data$USUBJID, .data$PARAMCD, .data$AVISITN, .data$ADTM ) i_lbls <- sapply( names(col_labels(tmc_ex_advs)[is.na(col_labels(tmc_ex_advs))]), function(x) which(names(common_var_labels) == x) ) col_labels(tmc_ex_advs[names(i_lbls)]) <- common_var_labels[i_lbls] save(tmc_ex_advs, file = \"data/tmc_ex_advs.rda\", compress = \"xz\") }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/generate_tmc_test_data.html","id":"generate-data","dir":"Articles","previous_headings":"","what":"Generate Data","title":"Example Data Generation","text":"","code":"# Generate & load adsl tmp_fol <- getwd() setwd(dirname(tmp_fol)) generate_adsl() load(\"data/tmc_ex_adsl.rda\") # Generate other datasets generate_adae() generate_adaette() generate_adcm() generate_adeg() generate_adex() generate_adlb() generate_admh() generate_adqs() generate_adrs() generate_adtte() generate_advs() setwd(tmp_fol)"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"section","dir":"Articles","previous_headings":"","what":"Quick start: `substitute` for NSE","title":"Quick start: `substitute` for NSE","text":"Considering expression, R usually evaluates returns value. Instead focusing value, also possible work code generated value. non standard evaluation, NSE, starts. function substitute important element non-standard evaluation. instance, consider defined <- 5, expression returns 5, substitute() returns code obtain value: . principle teal relies : generate expressions. return result expression result panel app. return corresponding code (expression) Show R Code. expression returning displayed value must reactive. information encoding one hand, filtering panel hand modify expression displayed value. , teal needs work expressions values relies heavily NSE. NSE advanced notion mixing Shiny app development source difficulties : hindered coding efficiency Shiny app must run order check correct execution code. limited possibilities testing. alternative, possible focus first NSE aspects plain R, ready, integrate Shiny App. following practical examples demonstrating NSE works. choice made focus substitute.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"nse-principle","dir":"Articles","previous_headings":"The Basics","what":"NSE Principle","title":"Quick start: `substitute` for NSE","text":"happened? substitute returns code value, attempt run code, therefore possible return expression make sense (yet), instance involving two non defined objects. values b exist, expression can run without error: Now, function name substitute reason. returning expression, also operates substitutions terms within given expression. happened? objects b exist function environment substitute called. terms expression within substitute replaced values b. Indeed, returning expression, substitute verifies b don’t value existing evaluation environment. , values b used expression. also possible use second argument substitute, env, environment (list) containing objects. expression submitted substitute corresponding objects env, terms within expression substituted provided values: happened? environment values b taken directly declared within substitute expression (argument expr) values substituted (argument env). substitute returned non-evaluated expression, use eval() evaluate . slightly elaborate expression: Note : x argument name plot preserved, x object replaced.","code":"non_evaluated_expression <- substitute(expr = a + b) non_evaluated_expression ## a + b eval(non_evaluated_expression) ## Error in eval(non_evaluated_expression): object 'b' not found non_evaluated_expression <- substitute(expr = a + b) a <- 1 b <- 5 eval(non_evaluated_expression) ## [1] 6 fun <- function(a, b) { substitute(expr = a + b) } non_evaluated_expression <- fun(5, -2) non_evaluated_expression ## 5 + -2 eval(non_evaluated_expression) ## [1] 3 non_evaluated_expression <- substitute( expr = a + b, env = list(a = 5, b = 5) ) non_evaluated_expression ## 5 + 5 eval(non_evaluated_expression) ## [1] 10 non_evaluated_expression <- substitute( expr = plot(x = x, y = exp(x), main = text), env = list(x = 0:10, text = \"A graph\") ) non_evaluated_expression ## plot(x = 0:10, y = exp(0:10), main = \"A graph\") eval(non_evaluated_expression)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"replace-an-object-name","dir":"Articles","previous_headings":"The Basics","what":"Replace an object name","title":"Quick start: `substitute` for NSE","text":"formulas, character strings accepted, execute substitution? object names specific class (name); .names coerces character string object name (alternatively, .symbol provides identical result):","code":"# Error expected: plot_expr <- substitute( expr = plot(y ~ x, data = iris, main = text), env = list( x = Sepal.Length, y = Sepal.Width, text = \"Iris, again ...\" ) ) ## Error: object 'Sepal.Length' not found # Error expected: plot_expr <- substitute( expr = plot(y ~ x, data = iris, main = text), env = list( x = \"Sepal.Length\", y = \"Sepal.Width\", text = \"Iris, again ...\" ) ) plot_expr ## plot(\"Sepal.Width\" ~ \"Sepal.Length\", data = iris, main = \"Iris, again ...\") eval(plot_expr) ## Error in terms.formula(formula, data = data): invalid term in model formula plot_expr <- substitute( expr = plot(y ~ x, data = iris, main = text), env = list( x = as.name(\"Sepal.Length\"), y = as.symbol(\"Sepal.Width\"), text = \"Iris, again ...\" ) ) plot_expr ## plot(Sepal.Width ~ Sepal.Length, data = iris, main = \"Iris, again ...\") eval(plot_expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"what-about-dataframe-names","dir":"Articles","previous_headings":"The Basics","what":"What about dataframe names?","title":"Quick start: `substitute` for NSE","text":"Lets imagine pipe-flavored expression, df term corresponding dataframe substituted: df %>% plot(y ~ x, data = ., main = text). principle exposed can work directly without addition. However, df expression replaced directly value object provided expression generating dataframe: pipeline working humanly readable. can replace value expression generating value? pretty much topic vignette: substitute.","code":"library(dplyr) ## Error in get(paste0(generic, \".\", class), envir = get_method_env()) : ## object 'type_sum.accel' not found ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union short_iris <- head(iris) plot_expr <- substitute( expr = df %>% plot(y ~ x, data = ., main = text), env = list( df = short_iris, x = as.name(\"Sepal.Length\"), y = as.symbol(\"Sepal.Width\"), text = \"Iris, again ...\" ) ) eval(plot_expr) plot_expr ## list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4), Sepal.Width = c(3.5, ## 3, 3.2, 3.1, 3.6, 3.9), Petal.Length = c(1.4, 1.4, 1.3, 1.5, ## 1.4, 1.7), Petal.Width = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.4), Species = c(1L, ## 1L, 1L, 1L, 1L, 1L)) %>% plot(Sepal.Width ~ Sepal.Length, data = ., ## main = \"Iris, again ...\") plot_expr <- substitute( expr = df %>% plot(y ~ x, data = ., main = text), env = list( df = substitute(iris), x = as.name(\"Sepal.Length\"), y = as.symbol(\"Sepal.Width\"), text = \"Iris, again ...\" ) ) plot_expr ## iris %>% plot(Sepal.Width ~ Sepal.Length, data = ., main = \"Iris, again ...\") eval(plot_expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"in-a-nutshell","dir":"Articles","previous_headings":"The Basics","what":"In a nutshell","title":"Quick start: `substitute` for NSE","text":"expr expression (eventually) substituted. env environment potential replacement value might needed. object name (like formulas e.g. y ~ x) , use .name .symbol. data frame name (like iris) , use substitute.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"direct-use-of-substitute","dir":"Articles","previous_headings":"rtables","what":"Direct use of substitute","title":"Quick start: `substitute` for NSE","text":"substitute approach can used rtables pipelines. Lets prepare example reporting data LB domain. example based template LBT01; target report columns lab test result per study arm, values (AVAL) changes baseline (CHG), per analysis visit rows. data can prepared follows: rtables expression obtained : expression valid … : … easily readable …: … can arranged:","code":"library(teal.modules.clinical) library(dplyr) adlb <- tmc_ex_adlb adlb_f <- adlb %>% filter( PARAM == \"Alanine Aminotransferase Measurement\" & ARMCD %in% c(\"ARM A\", \"ARM B\") & AVISIT == \"WEEK 1 DAY 8\" ) rtables_expr <- substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ) %>% summarize_colvars() %>% build_table(df = df), env = list( df = substitute(adlb_f), arm = \"ARM\", visit = \"AVISIT\" ) ) eval(rtables_expr) ## A: Drug X B: Placebo ## Value Change Value Change ## —————————————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 rtables_expr ## basic_table() %>% split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", ## \"Change\")) %>% summarize_colvars() %>% build_table(df = adlb_f) library(teal) library(styler) #' Stylish code #' #' Deparse an expression and display the code following NEST conventions. #' #' @param expr (`call`)\\cr or possibly understood as so. #' styled_expr <- function(expr) { print( styler::style_text(text = deparse(expr)), colored = FALSE ) } #' #' @examples styled_expr(rtables_expr) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"substitute-in-a-function","dir":"Articles","previous_headings":"rtables","what":"substitute in a function","title":"Quick start: `substitute` for NSE","text":"Moving , substitute can actually wrapped function, way rtables pipelines programmatically obtained: results obtained … , fine tuning easier. instance, variable designating study arm visit can changed, expected feature teal module encoding panel.","code":"rtables_expr <- function(df, arm, visit) { substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ) %>% summarize_colvars() %>% build_table(df = df), env = list( df = substitute(df), arm = arm, visit = visit ) ) } result <- rtables_expr(df = adlb_f, arm = \"ARM\", visit = \"AVISIT\") styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f) eval(result) ## A: Drug X B: Placebo ## Value Change Value Change ## —————————————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 result <- rtables_expr(df = adlb_f, arm = \"ARMCD\", visit = \"AVISITN\") eval(result) ## Split var [AVISITN] was not character or factor. Converting to factor ## ARM A ARM B ## Value Change Value Change ## ————————————————————————————————————————————————————————————————————— ## 1 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARMCD\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISITN\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"chain-expressions-in-a-pipeline","dir":"Articles","previous_headings":"rtables","what":"Chain expressions in a pipeline","title":"Quick start: `substitute` for NSE","text":"also possible manipulate expressions, instance, expressions might chained pipeline. Expressions can arranged list, way, possible conditional editing expressions. context rtables, layers enclosing analyze call handle .stats option. lean expression include .stats option, default value changed. expected feature teal module rendering code Show R Code: First application standard statistics: statistics specifications:","code":"#' Expressions as a pipeline #' #' Accepts expressions to be chained using the `magrittr` pipeline-flavor. #' @param ... (`call`)\\cr or object which can be interpreted as so. #' (e.g. `name`) #' pipe_expr <- function(...) { exprs <- unlist(list(...)) exprs <- lapply( exprs, function(x) { x <- deparse(x) paste(x, collapse = \" \") } ) exprs <- unlist(exprs) exprs <- paste(exprs, collapse = \" %>% \") str2lang(exprs) } #' @examples result <- pipe_expr( expr1 = substitute(df), expr2 = substitute(head) ) result ## df %>% head rtables_expr <- function(df, arm, visit, .stats = NULL) { # The rtables layout is decomposed into a list of expressions. lyt <- list() # 1. First the columns and rows: lyt$structure <- substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ), env = list( arm = arm, visit = visit ) ) # 2. The analyze layer which depends on the use of .stats. lyt$analyze <- if (is.null(.stats)) { substitute( summarize_colvars() ) } else { substitute( summarize_colvars(.stats = .stats), list(.stats = .stats) ) } # 3. And finishing with rtables::build_table. lyt$build <- substitute( build_table(df = df), list(df = substitute(df)) ) # As previously demonstrated, expressions can be manipulated and # chained in a pipeline. pipe_expr(lyt) } result <- rtables_expr(df = adlb_f, arm = \"ARM\", visit = \"AVISIT\") styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars() %>% ## build_table(df = adlb_f) eval(result) ## A: Drug X B: Placebo ## Value Change Value Change ## —————————————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6) ## Median 20.4 2.4 20.0 -0.2 ## Min - Max 12.8 - 34.6 -11.3 - 14.2 12.6 - 29.0 -12.8 - 10.8 result <- rtables_expr( df = adlb_f, arm = \"ARM\", visit = \"AVISIT\", .stats = c(\"n\", \"mean_sd\") ) styled_expr(result) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars(.stats = c(\"n\", \"mean_sd\")) %>% ## build_table(df = adlb_f) eval(result) ## A: Drug X B: Placebo ## Value Change Value Change ## ——————————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 20.8 (4.1) 1.6 (6.1) 20.2 (4.1) -0.2 (5.6)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"including-pre-processing","dir":"Articles","previous_headings":"rtables","what":"Including pre-processing","title":"Quick start: `substitute` for NSE","text":"Finally, also possible wrap several expressions single function. instance, teal module generally includes pre-processing section: now possible modify studied parameter (PARAMCD) addition study arm visit variables names. two expressions consistent: two expressions can executed return rtables:","code":"rtables_expr <- function(df, paramcd, arm, visit, .stats = NULL) { # y is a list which will collect two expressions: # 1. y$data with the preprocessing steps. # 2. y$rtables the table layout and build. y <- list() # 1. Preprocessing --- y$data <- substitute( df <- df %>% filter( PARAMCD == paramcd & ARMCD %in% c(\"ARM A\", \"ARM B\") & AVISIT == \"WEEK 1 DAY 8\" ), list( df = substitute(df), paramcd = paramcd ) ) # 2. rtables layout --- lyt <- list() lyt$structure <- substitute( expr = basic_table() %>% split_cols_by(arm, split_fun = drop_split_levels) %>% split_rows_by(visit, split_fun = drop_split_levels) %>% split_cols_by_multivar( vars = c(\"AVAL\", \"CHG\"), varlabels = c(\"Value\", \"Change\") ), env = list( arm = arm, visit = visit ) ) lyt$analyze <- if (is.null(.stats)) { substitute( summarize_colvars() ) } else { substitute( summarize_colvars(.stats = .stats), list(.stats = .stats) ) } lyt$build <- substitute( build_table(df = df), list(df = substitute(df)) ) y$rtables <- pipe_expr(lyt) # Finally returns y as a list with two expressions. y } adlb <- tmc_ex_adlb result <- rtables_expr( df = adlb, paramcd = \"CRP\", arm = \"ARM\", visit = \"AVISIT\", .stats = c(\"n\", \"mean_sd\") ) styled_expr(result$data) ## adlb <- adlb %>% filter(PARAMCD == \"CRP\" & ARMCD %in% c( ## \"ARM A\", ## \"ARM B\" ## ) & AVISIT == \"WEEK 1 DAY 8\") styled_expr(result$rtables) ## basic_table() %>% ## split_cols_by(\"ARM\", split_fun = drop_split_levels) %>% ## split_rows_by(\"AVISIT\", split_fun = drop_split_levels) %>% ## split_cols_by_multivar(vars = c(\"AVAL\", \"CHG\"), varlabels = c( ## \"Value\", ## \"Change\" ## )) %>% ## summarize_colvars(.stats = c(\"n\", \"mean_sd\")) %>% ## build_table(df = adlb) result_exec <- mapply(eval, result) result_exec$rtables ## A: Drug X B: Placebo ## Value Change Value Change ## ———————————————————————————————————————————————————————————— ## WEEK 1 DAY 8 ## n 69 69 73 73 ## Mean (SD) 1.0 (0.2) 0.0 (0.3) 1.0 (0.2) 0.0 (0.3)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/quickstart_substitute.html","id":"in-a-nutshell-1","dir":"Articles","previous_headings":"rtables","what":"In a nutshell","title":"Quick start: `substitute` for NSE","text":"point, possible : generate rtables pipelines. chain expressions pipeline (e.g. pipe_expr) decompose rtables pipeline add conditional layers (e.g. .stats). group expressions single list control pre-processing rtables pipeline.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/teal-modules-clinical.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting Started with {teal.modules.clinical}","text":"teal.modules.clinical package implementing number teal modules helpful exploring clinical trials data, specifically targeted towards data following ADaM standards. teal.modules.clinical modules can used data ADaM standard clinical data, features package tailored towards data type. concepts presented require knowledge core features teal, specifically launch teal application pass data . Therefore, highly recommended refer home page introductory vignette teal package.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/teal-modules-clinical.html","id":"main-features","dir":"Articles","previous_headings":"","what":"Main Features","title":"Getting Started with {teal.modules.clinical}","text":"package provides ready--use teal modules can embed teal application. modules generate highly customizable tables, plots, outputs often used exploratory data analysis, including: ANCOVA - tm_t_ancova() Cox regression - tm_t_coxreg() Kaplan-Meier plot - tm_g_km() Logistic regression - tm_t_logistic() Bar chart - tm_g_barchart_simple() Confidence interval plot - tm_g_ci() Binary outcome response table - tm_t_binary_outcome() Summary adverse events table - tm_t_events_summary() SMQ table - tm_t_smq() Time--event table - tm_t_tte() library also offers group patient profile modules targeted clinical statisticians physicians want review data per patient basis. modules present data patient’s adverse events, severity, current therapy, laboratory results . See full index package functions & modules .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/teal-modules-clinical.html","id":"a-simple-application","dir":"Articles","previous_headings":"","what":"A Simple Application","title":"Getting Started with {teal.modules.clinical}","text":"teal.modules.clinical module needs embedded inside shiny/teal application interact . simple application including bar chart module look like :","code":"library(teal.modules.clinical) library(nestcolor) ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae app <- init( data = cdisc_data( ADSL = ADSL, ADAE = ADAE, code = \" ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae \" ), modules = list( tm_g_barchart_simple( label = \"ADAE Analysis\", x = data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices( ADAE, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"SAFFL\", \"STRATA2\" ) ), selected = \"ACTARM\", multiple = FALSE ) ) ) ) ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/articles/teal-modules-clinical.html","id":"try-it-out-in-shinylive","dir":"Articles","previous_headings":"A Simple Application","what":"Try it out in Shinylive","title":"Getting Started with {teal.modules.clinical}","text":"Open Shinylive Consider consulting documentation examples module (e.g. ?tm_g_barchart_simple). many, can also find useful links TLG Catalog additional example apps can found. teal.modules.clinical exports modules needs support libraries run teal app flesh functionality. example , tm_g_barchart_simple() function teal.modules.clinical whereas init() teal function, data_extract_spec(), select_spec(), variable_choices() teal.transform functions, cdisc_data() teal.data function. Let’s break app pieces: lines load libraries used example. use example data provided teal.modules.clinical package: nestcolor optional package can loaded apply standardized NEST color palette module plots. need load teal teal.modules.clinical already depends . next step, use teal create shiny UI server functions can launch using shiny. data argument tells teal input data - ADaM datasets ADSL ADAE - modules argument indicates modules included application. , include one module: tm_g_barchart_simple(). Finally, use shiny launch application: teal.modules.clinical modules allow specification arguments using teal.transform::choices_selected(), tm_t_summary() module following example. Please refer API reference specific modules examples information customization options available.","code":"library(teal.modules.clinical) library(nestcolor) ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae app <- init( data = cdisc_data( ADSL = ADSL, ADAE = ADAE, code = \" ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae \" ), modules = list( tm_g_barchart_simple( label = \"ADAE Analysis\", x = data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices( ADAE, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"SAFFL\", \"STRATA2\" ) ), selected = \"ACTARM\", multiple = FALSE ) ) ) ) ) if (interactive()) shinyApp(app$ui, app$server) ADSL <- tmc_ex_adsl app <- init( data = cdisc_data(ADSL = ADSL, code = \"ADSL <- tmc_ex_adsl\"), modules = list( tm_t_summary( label = \"Demographic Table\", dataname = \"ADSL\", arm_var = choices_selected(choices = c(\"ARM\", \"ARMCD\"), selected = \"ARM\"), summarize_vars = choices_selected( choices = c(\"SEX\", \"RACE\", \"BMRKR2\", \"EOSDY\", \"DCSREAS\", \"AGE\"), selected = c(\"SEX\", \"RACE\") ) ) ) ) if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joe Zhu. Author, maintainer. Jana Stoilova. Author. Davide Garolini. Author. Emily de la Rua. Author. Abinaya Yogasekaram. Author. Mahmoud Hallal. Author. Dawid Kaledkowski. Author. Rosemary Li. Author. Heng Wang. Author. Pawel Rucki. Author. Nikolas Burkoff. Author. Konrad Pagacz. Author. Vaakesan Sundrelingam. Contributor. Francois Collin. Contributor. Imanol Zubizarreta. Contributor. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zhu J, Stoilova J, Garolini D, de la Rua E, Yogasekaram , Hallal M, Kaledkowski D, Li R, Wang H, Rucki P, Burkoff N, Pagacz K (2024). teal.modules.clinical: 'teal' Modules Standard Clinical Outputs. R package version 0.9.1.9042, https://github.com/insightsengineering/teal.modules.clinical/, https://insightsengineering.github.io/teal.modules.clinical/main/.","code":"@Manual{, title = {teal.modules.clinical: 'teal' Modules for Standard Clinical Outputs}, author = {Joe Zhu and Jana Stoilova and Davide Garolini and Emily {de la Rua} and Abinaya Yogasekaram and Mahmoud Hallal and Dawid Kaledkowski and Rosemary Li and Heng Wang and Pawel Rucki and Nikolas Burkoff and Konrad Pagacz}, year = {2024}, note = {R package version 0.9.1.9042, https://github.com/insightsengineering/teal.modules.clinical/}, url = {https://insightsengineering.github.io/teal.modules.clinical/main/}, }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/index.html","id":"tealmodulesclinical","dir":"","previous_headings":"","what":"teal Modules for Standard Clinical Outputs","title":"teal Modules for Standard Clinical Outputs","text":"package contains set standard teal modules used CDISC data order generate many standard outputs used clinical trials. modules include, limited : Forest plots (tm_g_forest_rsp()/tm_g_forest_tte()) Line plots (tm_g_lineplot()) Kaplan-Meier plots (tm_g_km()) … MMRM (tm_a_mmrm()) Logistic regression (tm_t_logistic()) Cox regression (tm_t_coxreg()) … Unique patients (tm_t_summary()) Exposure across patients (tm_t_exposure()) Change baseline parameters (tm_t_summary_by()) … Table basic information chosen patient (tm_t_pp_basic_info()) Plot patient vitals time (tm_g_pp_vitals()) General timeline individual patients (tm_g_pp_patient_timeline()) … modules package implemented using functions R package tern order produce output. Please see Teal Gallery TLG Catalog examples shiny apps created using modules package.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"teal Modules for Standard Clinical Outputs","text":"Alternatively, might want use development version.","code":"install.packages('teal.modules.clinical') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.modules.clinical\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"teal Modules for Standard Clinical Outputs","text":"understand use package, please refer Getting Started article, provides multiple examples code implementation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/index.html","id":"playground","dir":"","previous_headings":"","what":"Playground","title":"teal Modules for Standard Clinical Outputs","text":"can try package without installing Shinylive: stable development","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"teal Modules for Standard Clinical Outputs","text":"encounter bug feature request, please file issue. questions, discussions, staying date, please use teal channel pharmaverse slack workspace.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/index.html","id":"acknowledgment","dir":"","previous_headings":"","what":"Acknowledgment","title":"teal Modules for Standard Clinical Outputs","text":"package result joint efforts many developers stakeholders. like thank everyone contributed far!","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/add_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression List — add_expr","title":"Expression List — add_expr","text":"Add new expression list (expressions).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/add_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression List — add_expr","text":"","code":"add_expr(expr_ls, new_expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/add_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression List — add_expr","text":"expr_ls (list call) list new expression added. new_expr (call) new expression add.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/add_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression List — add_expr","text":"list call.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/add_expr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Expression List — add_expr","text":"Offers stricter control add new expressions existing list. list expressions can later used generate pipeline, instance pipe_expr.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/add_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression List — add_expr","text":"","code":"library(rtables) lyt <- list() lyt <- add_expr(lyt, substitute(basic_table())) lyt <- add_expr( lyt, substitute(split_cols_by(var = arm), env = list(armcd = \"ARMCD\")) ) lyt <- add_expr( lyt, substitute( test_proportion_diff( vars = \"rsp\", method = \"cmh\", variables = list(strata = \"strata\") ) ) ) lyt <- add_expr(lyt, quote(build_table(df = dta))) pipe_expr(lyt) #> basic_table() %>% split_cols_by(var = arm) %>% test_proportion_diff(vars = \"rsp\", #> method = \"cmh\", variables = list(strata = \"strata\")) %>% #> build_table(df = dta)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/arm_ref_comp_observer.html","id":null,"dir":"Reference","previous_headings":"","what":"Observer for Treatment reference variable — arm_ref_comp_observer","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"Updates reference comparison Treatments selected Treatment variable changes","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/arm_ref_comp_observer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"","code":"arm_ref_comp_observer( session, input, output, id_ref = \"Ref\", id_comp = \"Comp\", id_arm_var, data, arm_ref_comp, module, on_off = reactive(TRUE), input_id = \"buckets\", output_id = \"arms_buckets\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/arm_ref_comp_observer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"session (environment) shiny session input (character) shiny input output (character) shiny input id_ref (character) id reference Treatment input UI element id_comp (character) id comparison group input UI element id_arm_var (character) id Treatment variable input UI element data (reactive data.frame) dataset used validate Treatment reference inputs set id_ref input. arm_ref_comp (unknown) Treatment reference compare variables provided nested list Treatment variable corresponds list specifying default levels reference comparison treatments. module (character) name module called (used produce informative error messages) on_off (logical) reactive can used stop whole observer FALSE. input_id (character) unique id buckets referenced . output_id (character) name UI id output written .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/arm_ref_comp_observer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Observer for Treatment reference variable — arm_ref_comp_observer","text":"Returns shinyvalidate::InputValidator checks least one reference comparison arm","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/as_num.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse text input to numeric vector — as_num","title":"Parse text input to numeric vector — as_num","text":"Generic parse text numeric vectors. initially designed robust interpretation text input teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/as_num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse text input to numeric vector — as_num","text":"","code":"as_num(str) # Default S3 method as_num(str) # S3 method for class 'character' as_num(str) # S3 method for class 'numeric' as_num(str) # S3 method for class 'factor' as_num(str) # S3 method for class 'logical' as_num(str)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/as_num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse text input to numeric vector — as_num","text":"str (vector) extract numeric .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/as_num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse text input to numeric vector — as_num","text":"vector numeric directly parsed numeric boolean. list numeric parsed character string, character string associated list item.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/as_num.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Parse text input to numeric vector — as_num","text":"function intended extract numeric character string, factor levels, boolean return vector numeric.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/as_num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parse text input to numeric vector — as_num","text":"","code":"dta <- list( character = c(\"text10,20.5letter30.!\", \"!-.40$$-50e5[\", NA), factor = factor(c(\"]+60e-6, 7.7%%8L\", \"%90sep.100\\\"1L\", NA_character_)), numeric = c(1, -5e+2, NA), logical = c(TRUE, FALSE, NA) ) lapply(dta, as_num) #> $character #> $character[[1]] #> [1] 10.0 20.5 30.0 #> #> $character[[2]] #> [1] -4e-01 -5e+06 #> #> $character[[3]] #> [1] NA #> #> #> $factor #> $factor[[1]] #> [1] 0.00006 7.70000 8.00000 #> #> $factor[[2]] #> [1] 90.0 0.1 1.0 #> #> $factor[[3]] #> [1] NA #> #> #> $numeric #> [1] 1 -500 NA #> #> $logical #> [1] 1 0 NA #>"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/bracket_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expressions in Brackets — bracket_expr","title":"Expressions in Brackets — bracket_expr","text":"Groups several expressions single bracketed expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/bracket_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expressions in Brackets — bracket_expr","text":"","code":"bracket_expr(exprs)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/bracket_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expressions in Brackets — bracket_expr","text":"exprs (list call) expressions concatenate single bracketed expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/bracket_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expressions in Brackets — bracket_expr","text":"{ object. See base::Paren() details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/bracket_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expressions in Brackets — bracket_expr","text":"","code":"adsl <- tmc_ex_adsl adrs <- tmc_ex_adrs expr1 <- substitute( expr = anl <- subset(df, PARAMCD == param), env = list(df = as.name(\"adrs\"), param = \"INVET\") ) expr2 <- substitute(expr = anl$rsp_lab <- d_onco_rsp_label(anl$AVALC)) expr3 <- substitute( expr = { anl$is_rsp <- anl$rsp_lab %in% c(\"Complete Response (CR)\", \"Partial Response (PR)\") } ) res <- bracket_expr(list(expr1, expr2, expr3)) eval(res) table(anl$rsp_lab, anl$is_rsp) #> #> FALSE TRUE #> Complete Response (CR) 0 60 #> Partial Response (PR) 0 45 #> Stable Disease (SD) 50 0 #> Progressive Disease (PD) 39 0 #> Not Evaluable (NE) 6 0"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/call_concatenate.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate expressions via a binary operator — call_concatenate","title":"Concatenate expressions via a binary operator — call_concatenate","text":"e.g. combine + ggplot without introducing parentheses due associativity","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/call_concatenate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate expressions via a binary operator — call_concatenate","text":"","code":"call_concatenate(args, bin_op = \"+\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/call_concatenate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate expressions via a binary operator — call_concatenate","text":"args arguments concatenate operator bin_op binary operator concatenate ","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/call_concatenate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate expressions via a binary operator — call_concatenate","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/call_concatenate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate expressions via a binary operator — call_concatenate","text":"","code":"library(ggplot2) # What we want to achieve call(\"+\", quote(f), quote(g)) #> f + g call(\"+\", quote(f), call(\"+\", quote(g), quote(h))) # parentheses not wanted #> f + (g + h) call(\"+\", call(\"+\", quote(f), quote(g)), quote(h)) # as expected without unnecessary parentheses #> f + g + h Reduce(function(existing, new) call(\"+\", existing, new), list(quote(f), quote(g), quote(h))) #> f + g + h # how we do it call_concatenate(list(quote(f), quote(g), quote(h))) #> f + g + h call_concatenate(list(quote(f))) #> f call_concatenate(list()) #> NULL call_concatenate( list(quote(ggplot(mtcars)), quote(geom_point(aes(wt, mpg)))) ) #> ggplot(mtcars) + geom_point(aes(wt, mpg)) eval( call_concatenate( list(quote(ggplot(mtcars)), quote(geom_point(aes(wt, mpg)))) ) )"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/check_arm_ref_comp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if the Treatment variable is reference or compare — check_arm_ref_comp","text":"","code":"check_arm_ref_comp(x, df_to_check, module)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/check_arm_ref_comp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if the Treatment variable is reference or compare — check_arm_ref_comp","text":"x (character) Name variable df_to_check (data.frame) table check module (character) teal module ref comp called ","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/check_arm_ref_comp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if the Treatment variable is reference or compare — check_arm_ref_comp","text":"TRUE FALSE whether variable ref comp","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/clean_description.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean up categorical variable description — clean_description","title":"Clean up categorical variable description — clean_description","text":"Cleaning categorical variable descriptions presenting.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/clean_description.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean up categorical variable description — clean_description","text":"","code":"clean_description(x)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/clean_description.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean up categorical variable description — clean_description","text":"x (character) vector categories descriptions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/clean_description.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean up categorical variable description — clean_description","text":"string","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/clean_description.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean up categorical variable description — clean_description","text":"","code":"clean_description(\"Level A (other text)\") #> [1] \"Level A\" clean_description(\"A long string that should be shortened\") #> [1] \"A long string tha...\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/color_lab_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Mapping function for Laboratory Table — color_lab_values","title":"Mapping function for Laboratory Table — color_lab_values","text":"Map value level characters values proper html tags, colors icons.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/color_lab_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mapping function for Laboratory Table — color_lab_values","text":"","code":"color_lab_values( x, classes = c(\"HIGH\", \"NORMAL\", \"LOW\"), colors = list(HIGH = \"red\", NORMAL = \"grey\", LOW = \"blue\"), default_color = \"black\", icons = list(HIGH = \"glyphicon glyphicon-arrow-up\", LOW = \"glyphicon glyphicon-arrow-down\") )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/color_lab_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mapping function for Laboratory Table — color_lab_values","text":"x (character) vector elements format (value level). classes (character) classes vector. colors (list) color per class. default_color (character) default color. icons (list) certain icons per level.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/color_lab_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mapping function for Laboratory Table — color_lab_values","text":"character vector element formatted HTML tag corresponding value x.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/color_lab_values.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mapping function for Laboratory Table — color_lab_values","text":"","code":"color_lab_values(c(\"LOW\", \"LOW\", \"HIGH\", \"NORMAL\", \"HIGH\")) #> LOW #> \"LOW<\/i><\/span>\" #> LOW #> \"LOW<\/i><\/span>\" #> HIGH #> \"HIGH<\/i><\/span>\" #> NORMAL #> \"NORMAL<\/i><\/span>\" #> HIGH #> \"HIGH<\/i><\/span>\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/column_annotation_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Get full label, useful for annotating plots — column_annotation_label","title":"Get full label, useful for annotating plots — column_annotation_label","text":"Get full label, useful annotating plots","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/column_annotation_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get full label, useful for annotating plots — column_annotation_label","text":"","code":"column_annotation_label(dataset, column, omit_raw_name = FALSE)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/column_annotation_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get full label, useful for annotating plots — column_annotation_label","text":"dataset (data.frame) dataset column (character) column get label omit_raw_name (logical) omits raw name square brackets label found","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/column_annotation_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get full label, useful for annotating plots — column_annotation_label","text":"\"Label [Column name]\" label exists, otherwise \"Column name\".","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/column_annotation_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get full label, useful for annotating plots — column_annotation_label","text":"","code":"data <- mtcars column_annotation_label(data, \"cyl\") #> [1] \"cyl\" attr(data[[\"cyl\"]], \"label\") <- \"Cylinder\" column_annotation_label(data, \"cyl\") #> [1] \"Cylinder [cyl]\" column_annotation_label(data, \"cyl\", omit_raw_name = TRUE) #> [1] \"Cylinder\" column_annotation_label(tmc_ex_adsl, \"ACTARM\") #> [1] \"Description of Actual Arm [ACTARM]\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/control_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"Control Function for Time-To-Event teal Module — control_tte","title":"Control Function for Time-To-Event teal Module — control_tte","text":"Controls arguments Cox regression survival analysis results.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/control_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Control Function for Time-To-Event teal Module — control_tte","text":"","code":"control_tte( surv_time = list(conf_level = 0.95, conf_type = \"plain\", quantiles = c(0.25, 0.75)), coxph = list(pval_method = \"log-rank\", ties = \"efron\", conf_level = 0.95), surv_timepoint = control_surv_timepoint(conf_level = 0.95, conf_type = c(\"plain\", \"none\", \"log\", \"log-log\")) )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/control_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Control Function for Time-To-Event teal Module — control_tte","text":"surv_time (list) control parameters survfit model. See tern::control_surv_time() details. coxph (list) control parameters Cox-PH model. See tern::control_coxph() details. surv_timepoint (list) control parameters survfit model time point. See tern::control_surv_timepoint() details.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"Convert choices_selected data_extract_spec filter_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"","code":"cs_to_des_filter( cs, dataname, multiple = FALSE, include_vars = FALSE, label = \"Filter by\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. dataname (character) name data multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). include_vars (flag) whether include filter variables fixed selection result. can useful preserving reuse rtables code e.g. label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_filter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to data_extract_spec with only filter_spec — cs_to_des_filter","text":"(teal.transform::data_extract_spec())","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_select.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"Convert choices_selected data_extract_spec select_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_select.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"","code":"cs_to_des_select( cs, dataname, multiple = FALSE, ordered = FALSE, label = \"Select\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_select.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. dataname (character) name data multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). ordered (logical(1)) Flags whether selection order tracked. label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_des_select.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to data_extract_spec with only select_spec — cs_to_des_select","text":"(teal.transform::data_extract_spec())","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_filter_spec.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to filter_spec — cs_to_filter_spec","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"Convert choices_selected filter_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_filter_spec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"","code":"cs_to_filter_spec(cs, multiple = FALSE, label = \"Filter by\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_filter_spec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_filter_spec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to filter_spec — cs_to_filter_spec","text":"(teal.transform::filter_spec())","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_select_spec.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert choices_selected to select_spec — cs_to_select_spec","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"Convert choices_selected select_spec","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_select_spec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"","code":"cs_to_select_spec(cs, multiple = FALSE, ordered = FALSE, label = \"Select\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_select_spec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"cs (choices_selected) object transformed. See teal.transform::choices_selected() details. multiple (logical) Whether multiple values shall allowed shiny shiny::selectInput(). ordered (logical(1)) Flags whether selection order tracked. label (character) Label print selection field. label, set NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/cs_to_select_spec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert choices_selected to select_spec — cs_to_select_spec","text":"(select_spec)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/default_total_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Default string for total column label — default_total_label","title":"Default string for total column label — default_total_label","text":"default string used label \"total\" column. value used default value total_label argument throughout teal.modules.clinical package. specified module user via total_label argument, R environment options via set_default_total_label(), \"Patients\" used.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/default_total_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default string for total column label — default_total_label","text":"","code":"default_total_label() set_default_total_label(total_label)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/default_total_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default string for total column label — default_total_label","text":"total_label (string) Single string value set R environment options default label use \"total\" column. Use getOption(\"tmc_default_total_label\") check current value set R environment (defaults \"Patients\" set).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/default_total_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default string for total column label — default_total_label","text":"default_total_label returns current value R environment option set \"tmc_default_total_label\", \"Patients\" otherwise. set_default_total_label return value.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/default_total_label.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Default string for total column label — default_total_label","text":"default_total_label(): Getter default total column label. set_default_total_label(): Setter default total column label. Sets option \"tmc_default_total_label\" within R environment.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/default_total_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Default string for total column label — default_total_label","text":"","code":"# Default settings default_total_label() #> [1] \"All Patients\" getOption(\"tmc_default_total_label\") #> NULL # Set custom value set_default_total_label(\"All Patients\") # Settings after value has been set default_total_label() #> [1] \"All Patients\" getOption(\"tmc_default_total_label\") #> [1] \"All Patients\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/ex_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated CDISC Data for Examples — ex_data","title":"Simulated CDISC Data for Examples — ex_data","text":"Simulated CDISC Data Examples","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/ex_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulated CDISC Data for Examples — ex_data","text":"","code":"tmc_ex_adsl tmc_ex_adae tmc_ex_adaette tmc_ex_adcm tmc_ex_adeg tmc_ex_adex tmc_ex_adlb tmc_ex_admh tmc_ex_adqs tmc_ex_adrs tmc_ex_adtte tmc_ex_advs"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/ex_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated CDISC Data for Examples — ex_data","text":"rds (data.frame) object class tbl_df (inherits tbl, data.frame) 200 rows 26 columns. object class tbl_df (inherits tbl, data.frame) 541 rows 51 columns. object class tbl_df (inherits tbl, data.frame) 1800 rows 35 columns. object class tbl_df (inherits tbl, data.frame) 512 rows 45 columns. object class tbl_df (inherits tbl, data.frame) 5200 rows 48 columns. object class tbl_df (inherits tbl, data.frame) 200 rows 37 columns. object class tbl_df (inherits tbl, data.frame) 3000 rows 58 columns. object class tbl_df (inherits tbl, data.frame) 1077 rows 33 columns. object class tbl_df (inherits tbl, data.frame) 7000 rows 36 columns. object class tbl_df (inherits tbl, data.frame) 1600 rows 34 columns. object class tbl_df (inherits tbl, data.frame) 1000 rows 34 columns. object class tbl_df (inherits tbl, data.frame) 8400 rows 34 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/ex_data.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Simulated CDISC Data for Examples — ex_data","text":"tmc_ex_adsl: ADSL data tmc_ex_adae: ADAE data tmc_ex_adaette: ADAETTE data tmc_ex_adcm: ADCM data tmc_ex_adeg: ADEG data tmc_ex_adex: ADEX data tmc_ex_adlb: ADLB data tmc_ex_admh: ADMH data tmc_ex_adqs: ADQS data tmc_ex_adrs: ADRS data tmc_ex_adtte: ADTTE data tmc_ex_advs: ADVS data","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/extract_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts html id for data_extract_ui — extract_input","title":"Extracts html id for data_extract_ui — extract_input","text":"data_extract_ui located extended html id. use ns(\"original id\") reference, extended specific suffixes.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/extract_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts html id for data_extract_ui — extract_input","text":"","code":"extract_input(varname, dataname, filter = FALSE)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/extract_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts html id for data_extract_ui — extract_input","text":"varname (character) original html id. retrieved ns(\"original id\") UI function session$ns(\"original id\")/\"original id\" server function. dataname (character)dataname data_extract input. might retrieved like data_extract_spec(...)[[1]]$dataname. filter (logical) optional, connected extract_data_spec objects passed filter argument","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/extract_input.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts html id for data_extract_ui — extract_input","text":"string","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/extract_input.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts html id for data_extract_ui — extract_input","text":"","code":"extract_input(\"ARM\", \"ADSL\") #> [1] \"ARM-dataset_ADSL_singleextract-select\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/facet_grid_formula.html","id":null,"dir":"Reference","previous_headings":"","what":"Facetting formula x_facet ~ y_facet — facet_grid_formula","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"Replaces x_facet y_facet . empty character","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/facet_grid_formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"","code":"facet_grid_formula(x_facet, y_facet)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/facet_grid_formula.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"x_facet (character(1)) name x facet, empty, facet along x. y_facet (character(1)) name y facet, empty, facet along y.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/facet_grid_formula.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Facetting formula x_facet ~ y_facet — facet_grid_formula","text":"facet grid formula formula(x_facet ~ y_facet)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_g_forest_obj_var_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","title":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","text":"Utility function extracting paramcd forest plots","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_g_forest_obj_var_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","text":"","code":"get_g_forest_obj_var_name(paramcd, input, filter_idx = 1)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_g_forest_obj_var_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Utility function for extracting paramcd for forest plots — get_g_forest_obj_var_name","text":"paramcd teal.transform::data_extract_spec() variable value designating studied parameter. input shiny app input filter_idx filter section index (default 1)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_paramcd_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the associated parameter value for paramcd — get_paramcd_label","title":"Extract the associated parameter value for paramcd — get_paramcd_label","text":"Utility function extracting parameter value associated paramcd value label. parameter value paramcd label, paramcd value returned. used generating title.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_paramcd_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the associated parameter value for paramcd — get_paramcd_label","text":"","code":"get_paramcd_label(anl, paramcd)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_paramcd_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the associated parameter value for paramcd — get_paramcd_label","text":"anl Analysis dataset paramcd teal.transform::data_extract_spec() variable value designating studied parameter.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_var_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variable labels — get_var_labels","text":"","code":"get_var_labels(datasets, dataname, vars)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_var_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get variable labels — get_var_labels","text":"datasets (teal::FilteredData) Data built teal dataname (character) name dataset vars (character) Column names data","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/get_var_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variable labels — get_var_labels","text":"character variable labels.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/h_concat_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression Deparsing — h_concat_expr","title":"Expression Deparsing — h_concat_expr","text":"Deparse expression string.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/h_concat_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression Deparsing — h_concat_expr","text":"","code":"h_concat_expr(expr)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/h_concat_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression Deparsing — h_concat_expr","text":"expr (call) object can used .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/h_concat_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression Deparsing — h_concat_expr","text":"string.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/h_concat_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression Deparsing — h_concat_expr","text":"","code":"expr <- quote({ library(rtables) basic_table() %>% split_cols_by(var = \"ARMCD\") %>% test_proportion_diff( vars = \"rsp\", method = \"cmh\", variables = list(strata = \"strata\") ) %>% build_table(df = dta) }) h_concat_expr(expr) #> [1] \"{\\n library(rtables)\\n basic_table() %>% split_cols_by(var = \\\"ARMCD\\\") %>% test_proportion_diff(vars = \\\"rsp\\\", \\n method = \\\"cmh\\\", variables = list(strata = \\\"strata\\\")) %>% \\n build_table(df = dta)\\n}\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/is.cs_or_des.html","id":null,"dir":"Reference","previous_headings":"","what":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"Whether object class teal.transform::choices_selected()","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/is.cs_or_des.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"","code":"is.cs_or_des(x)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/is.cs_or_des.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"x object checked","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/is.cs_or_des.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Whether object is of class teal.transform::choices_selected() — is.cs_or_des","text":"(logical)","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/make_barchart_simple_call.html","id":null,"dir":"Reference","previous_headings":"","what":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"ggplot2 call generate simple bar chart","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/make_barchart_simple_call.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"","code":"make_barchart_simple_call( y_name, x_name = NULL, fill_name = NULL, x_facet_name = NULL, y_facet_name = NULL, label_bars = TRUE, barlayout = c(\"side_by_side\", \"stacked\"), flip_axis = FALSE, rotate_bar_labels = FALSE, rotate_x_label = FALSE, rotate_y_label = FALSE, expand_y_range = 0, facet_scales = \"free_x\", ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/make_barchart_simple_call.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"y_name (character NULL) name y-axis variable. x_name (character NULL) name x-axis variable. Defaults NULL dependent extract input can empty. fill_name (character NULL) name variable determine bar fill color. x_facet_name (character NULL) name variable use horizontal plot faceting. y_facet_name (character NULL) name variable use vertical plot faceting. label_bars (logical NULL) whether bars labeled. TRUE, label bar numbers also drawn text. barlayout (character NULL) type bar layout. Options \"stacked\" (default) \"side_by_side\". flip_axis (character NULL) whether flip plot axis. rotate_bar_labels (logical NULL) whether bar labels rotated 45 degrees. rotate_x_label (logical NULL) whether x-axis labels rotated 45 degrees. rotate_y_label (logical NULL) whether y-axis labels rotated 45 degrees. expand_y_range (numeric NULL) fraction y-axis range expand . facet_scales (character) value passed scales argument ggplot2::facet_grid(). Options fixed, free_x, free_y, free. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/make_barchart_simple_call.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ggplot2 call to generate simple bar chart — make_barchart_simple_call","text":"call produce ggplot object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/module_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard Module Arguments — module_arguments","title":"Standard Module Arguments — module_arguments","text":"documentation function lists arguments teal modules used repeatedly express analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/module_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standard Module Arguments — module_arguments","text":"arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. atirel (teal.transform::choices_selected()) object available choices preselected option ATIREL variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. avisit (teal.transform::choices_selected()) value analysis visit AVISIT interest. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. by_vars (teal.transform::choices_selected()) object available choices preselected option variable names used split summary rows. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname. cmindc (teal.transform::choices_selected()) object available choices preselected option CMINDC variable dataname. cmstdy (teal.transform::choices_selected()) object available choices preselected option CMSTDY variable dataname. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. dataname (character) analysis data used teal module. default_responses (list character) defines default codes response variable module per value paramcd. passed vector transmitted paramcd values. passed list must named contain arrays, name corresponding single value paramcd. array may contain default response values named arrays rsp default selected response values levels default level choices. fixed_symbol_size (logical) (TRUE), symbol size used plotting estimate. Otherwise, symbol size proportional sample size subgroup. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. hlt (teal.transform::choices_selected()) name variable high level term events. id_var (teal.transform::choices_selected()) object specifying variable name subject id. interact_var (character) name variable interactions arm. interaction needed, default option NULL. interact_y (character) selected item interact_var column used select specific ANCOVA results interact_var discrete. interaction needed, default option FALSE. label (character) menu item label module teal app. llt (teal.transform::choices_selected()) name variable low level term events. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. pre_output (shiny.tag) optional, text placed output put output context. example title. strata_var (teal.transform::choices_selected()) names variables stratified analysis. summarize_vars (teal.transform::choices_selected()) names variables summarized. subgroup_var (teal.transform::choices_selected()) object available choices preselected option variable names can used default subgroups. time_points (teal.transform::choices_selected()) object available choices preselected option time points can used tern::surv_timepoint(). time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. useNA (character) whether missing data (NA) displayed level. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. worst_flag_indicator (teal.transform::choices_selected()) value indicating worst grade. worst_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used worst flag variable. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/module_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standard Module Arguments — module_arguments","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/module_arguments.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standard Module Arguments — module_arguments","text":"Although function just returns NULL two uses, teal module users provides documentation arguments commonly consistently used framework. developer adds single reference point import roxygen argument description : @inheritParams module_arguments Parameters identical descriptions & input types Standard Template Arguments section excluded reduce duplication module function inherits parameters corresponding template function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/normalize_decorators.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert flat list of teal_transform_module to named lists — normalize_decorators","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"Convert flat list teal_transform_module named lists","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/normalize_decorators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"","code":"normalize_decorators(decorators)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/normalize_decorators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"decorators (list teal_transformodules) normalize.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/normalize_decorators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert flat list of teal_transform_module to named lists — normalize_decorators","text":"named list lists teal_transform_module objects.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/pipe_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Expressions as a Pipeline — pipe_expr","title":"Expressions as a Pipeline — pipe_expr","text":"Concatenate expressions single pipeline-flavor expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/pipe_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expressions as a Pipeline — pipe_expr","text":"","code":"pipe_expr(exprs, pipe_str = \"%>%\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/pipe_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expressions as a Pipeline — pipe_expr","text":"exprs (list call) expressions concatenate pipeline (%>%). pipe_str (character) character separates expressions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/pipe_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expressions as a Pipeline — pipe_expr","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/pipe_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expressions as a Pipeline — pipe_expr","text":"","code":"pipe_expr( list( expr1 = substitute(df), expr2 = substitute(head) ) ) #> df %>% head"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression: Arm Preparation — prepare_arm","title":"Expression: Arm Preparation — prepare_arm","text":"function generate standard expression pre-processing dataset teal module applications. especially interest preprocessing steps needs applied similarly several datasets (e.g. ADSL ADRS).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression: Arm Preparation — prepare_arm","text":"","code":"prepare_arm( dataname, arm_var, ref_arm, comp_arm, compare_arm = !is.null(ref_arm), ref_arm_val = paste(ref_arm, collapse = \"/\"), drop = TRUE )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression: Arm Preparation — prepare_arm","text":"dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. ref_arm_val (character) replacement name reference level. drop (logical) drop unused variable levels.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression: Arm Preparation — prepare_arm","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Expression: Arm Preparation — prepare_arm","text":"teal.modules.clinical, user interface includes manipulation study arms. Classically: arm variable (e.g. ARM, ACTARM), reference arm (0 ), comparison arm (1 ) possibility combine comparison arms. Note arms compared , produced expression reduced optionally dropping non-represented levels arm. comparing arms, pre-processing includes three steps: Filtering dataset retain arms interest (reference comparison). Optional, one arm designated reference combined single level. reference explicitly reassigned non-represented levels arm dropped.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression: Arm Preparation — prepare_arm","text":"","code":"prepare_arm( dataname = \"adrs\", arm_var = \"ARMCD\", ref_arm = \"ARM A\", comp_arm = c(\"ARM B\", \"ARM C\") ) #> adrs %>% dplyr::filter(ARMCD %in% c(\"ARM A\", \"ARM B\", \"ARM C\")) %>% #> dplyr::mutate(ARMCD = stats::relevel(ARMCD, ref = \"ARM A\")) %>% #> dplyr::mutate(ARMCD = droplevels(ARMCD)) prepare_arm( dataname = \"adsl\", arm_var = \"ARMCD\", ref_arm = c(\"ARM B\", \"ARM C\"), comp_arm = \"ARM A\" ) #> adsl %>% dplyr::filter(ARMCD %in% c(\"ARM B\", \"ARM C\", \"ARM A\")) %>% #> dplyr::mutate(ARMCD = combine_levels(ARMCD, levels = c(\"ARM B\", #> \"ARM C\"), new_level = \"ARM B/ARM C\")) %>% dplyr::mutate(ARMCD = stats::relevel(ARMCD, #> ref = \"ARM B/ARM C\")) %>% dplyr::mutate(ARMCD = droplevels(ARMCD))"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Expression: Prepare Arm Levels — prepare_arm_levels","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"function generates standard expression pre-processing dataset arm levels used apply steps safety teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"","code":"prepare_arm_levels(dataname, parentname, arm_var, drop_arm_levels = TRUE)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm_levels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"{ object. See base::Paren() details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/prepare_arm_levels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expression: Prepare Arm Levels — prepare_arm_levels","text":"","code":"prepare_arm_levels( dataname = \"adae\", parentname = \"adsl\", arm_var = \"ARMCD\", drop_arm_levels = TRUE ) #> { #> adae <- adae %>% dplyr::mutate(ARMCD = droplevels(ARMCD)) #> arm_levels <- levels(adae[[\"ARMCD\"]]) #> adsl <- adsl %>% dplyr::filter(ARMCD %in% arm_levels) #> adsl <- adsl %>% dplyr::mutate(ARMCD = droplevels(ARMCD)) #> } prepare_arm_levels( dataname = \"adae\", parentname = \"adsl\", arm_var = \"ARMCD\", drop_arm_levels = FALSE ) #> { #> adsl <- adsl %>% dplyr::mutate(ARMCD = droplevels(ARMCD)) #> arm_levels <- levels(adsl[[\"ARMCD\"]]) #> adae <- adae %>% dplyr::mutate(ARMCD = factor(ARMCD, levels = arm_levels)) #> }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/select_decorators.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset decorators based on the scope — select_decorators","title":"Subset decorators based on the scope — select_decorators","text":"default protected decorator name always included output, exists","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/select_decorators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset decorators based on the scope — select_decorators","text":"","code":"select_decorators(decorators, scope)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/select_decorators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset decorators based on the scope — select_decorators","text":"decorators (named list) list decorators subset. scope (character) character vector decorator names include.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/select_decorators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset decorators based on the scope — select_decorators","text":"flat list decorators include. can empty list none scope exists decorators argument.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_choices.html","id":null,"dir":"Reference","previous_headings":"","what":"Split choices_selected objects with interactions into their component variables — split_choices","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"Split choices_selected objects interactions component variables","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_choices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"","code":"split_choices(x)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_choices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"x (choices_selected) object interaction terms","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_choices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"teal.transform::choices_selected() object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_choices.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"uses regex \\\\*|: perform split.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_choices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split choices_selected objects with interactions into their component variables — split_choices","text":"","code":"split_choices(choices_selected(choices = c(\"x:y\", \"a*b\"), selected = all_choices())) #> $choices #> [1] \"x\" \"y\" \"a\" \"b\" #> #> $selected #> [1] \"x\" \"y\" \"a\" \"b\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_col_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Split-Column Expression — split_col_expr","title":"Split-Column Expression — split_col_expr","text":"Renders expression column split rtables depending : expected arm comparison expected arm combination","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_col_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split-Column Expression — split_col_expr","text":"","code":"split_col_expr(compare, combine, ref, arm_var)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_col_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split-Column Expression — split_col_expr","text":"compare (logical) TRUE reference level included. combine (logical) TRUE group combination included. ref (character) reference level (used combine = TRUE). arm_var (character) arm grouping variable name.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_col_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split-Column Expression — split_col_expr","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_col_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split-Column Expression — split_col_expr","text":"","code":"split_col_expr( compare = TRUE, combine = FALSE, ref = \"ARM A\", arm_var = \"ARMCD\" ) #> rtables::split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_interactions.html","id":null,"dir":"Reference","previous_headings":"","what":"Split interaction terms into their component variables — split_interactions","title":"Split interaction terms into their component variables — split_interactions","text":"Split interaction terms component variables","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_interactions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split interaction terms into their component variables — split_interactions","text":"","code":"split_interactions(x, by = \"\\\\*|:\")"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_interactions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split interaction terms into their component variables — split_interactions","text":"x (character) string representing interaction usually form x:y x*y. (character) regex split interaction term .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_interactions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split interaction terms into their component variables — split_interactions","text":"vector strings element component variable extracted interaction term x.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/split_interactions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split interaction terms into their component variables — split_interactions","text":"","code":"split_interactions(\"x:y\") #> [1] \"x\" \"y\" split_interactions(\"x*y\") #> [1] \"x\" \"y\""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/srv_decorate_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"Wrappers around srv_transform_teal_data allows decorate data","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/srv_decorate_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"","code":"srv_decorate_teal_data(id, data, decorators, expr, expr_is_reactive = FALSE) ui_decorate_teal_data(id, decorators, ...)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/srv_decorate_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"id (character(1)) Module id data (reactive teal_data) expr (expression reactive) evaluate output decoration. expression must inline code. See within() Default NULL evaluate appending code. expr_is_reactive (logical(1)) whether expr reactive expression skips defusing argument.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/srv_decorate_teal_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrappers around srv_transform_teal_data that allows to decorate the data — srv_decorate_teal_data","text":"srv_decorate_teal_data wrapper around srv_transform_teal_data allows decorate data additional expressions. original teal_data object error state, show error first. ui_decorate_teal_data wrapper around ui_transform_teal_data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Substitute Names in a Quoted Expression — substitute_names","title":"Substitute Names in a Quoted Expression — substitute_names","text":"function substitutes names left- right-hand sides quoted expression. addition can also standard substitutions right-hand side.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Substitute Names in a Quoted Expression — substitute_names","text":"","code":"substitute_names(expr, names, others = list()) h_subst_lhs_names(qexpr, names) substitute_lhs_names(qexpr, names) substitute_rhs(qexpr, env)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Substitute Names in a Quoted Expression — substitute_names","text":"expr (language) expression. names (named list name) requested name substitutions. others (named list) requested substitutions happen right-hand side. qexpr (language) quoted expression. env (environment list) requested variable substitutions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Substitute Names in a Quoted Expression — substitute_names","text":"modified expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_names.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Substitute Names in a Quoted Expression — substitute_names","text":"h_subst_lhs_names(): Helper function just substitute top-level names left-hand side quoted expression. substitute_lhs_names(): recursively substitutes names left-hand sides quoted expression. substitute_rhs(): substitutes right-hand side quoted expression. Note just synonym substitute_q().","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_q.html","id":null,"dir":"Reference","previous_headings":"","what":"Substitute in Quoted Expressions — substitute_q","title":"Substitute in Quoted Expressions — substitute_q","text":"version substitute needed substitute() evaluate first argument, often useful able modify quoted expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_q.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Substitute in Quoted Expressions — substitute_q","text":"","code":"substitute_q(qexpr, env)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_q.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Substitute in Quoted Expressions — substitute_q","text":"qexpr (language) quoted expression. env (environment list) requested variable substitutions.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_q.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Substitute in Quoted Expressions — substitute_q","text":"modified expression.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/substitute_q.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Substitute in Quoted Expressions — substitute_q","text":"simplified package pryr avoid another dependency.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/teal.modules.clinical-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Modules for Standard Clinical Outputs — teal.modules.clinical-package","title":"teal Modules for Standard Clinical Outputs — teal.modules.clinical-package","text":"Provides teal modules standard clinical trials outputs. teal modules add encoding panel interactively change encodings within teal.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/teal.modules.clinical-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal Modules for Standard Clinical Outputs — teal.modules.clinical-package","text":"Maintainer: Joe Zhu joe.zhu@roche.com Authors: Jana Stoilova jana.stoilova@roche.com Davide Garolini davide.garolini@roche.com Emily de la Rua emily.de_la_rua@contractors.roche.com Abinaya Yogasekaram abinaya.yogasekaram@contractors.roche.com Mahmoud Hallal mahmoud.hallal@roche.com Dawid Kaledkowski dawid.kaledkowski@roche.com Rosemary Li li.yaqiong@gene.com Heng Wang wang.heng@gene.com Pawel Rucki pawel.rucki@roche.com Nikolas Burkoff Konrad Pagacz contributors: Vaakesan Sundrelingam [contributor] Francois Collin [contributor] Imanol Zubizarreta [contributor] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_a_gee.html","id":null,"dir":"Reference","previous_headings":"","what":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"Creates valid expression generate analysis table using Generalized Estimating Equations (GEE).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_a_gee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"","code":"template_a_gee( output_table, data_model_fit = \"ANL\", dataname_lsmeans = \"ANL_ADSL\", input_arm_var = \"ARM\", ref_group = \"A: Drug X\", aval_var, id_var, arm_var, visit_var, split_covariates, cor_struct, conf_level = 0.95, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_a_gee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"output_table (character) type output table (\"t_gee_cov\", \"t_gee_coef\", \"t_gee_lsmeans\"). data_model_fit (character) dataset used fit model tern.gee::fit_gee(). dataname_lsmeans (character) dataset used alt_counts_df argument rtables::build_table(). aval_var (character) name analysis value variable. id_var (character) variable name subject id. arm_var (character) variable names can used arm_var. visit_var (character) variable names can used visit variable. Must factor dataname. split_covariates (character) vector names variables use covariates tern.gee::vars_gee(). cor_struct (character) assumed correlation structure tern.gee::fit_gee. conf_level (numeric) value confidence level within range (0, 1). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_a_gee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template for Generalized Estimating Equations (GEE) analysis module — template_a_gee","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Abnormality Summary Table — template_abnormality","title":"Template: Abnormality Summary Table — template_abnormality","text":"Creates valid expression generate table summarize abnormality.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Abnormality Summary Table — template_abnormality","text":"","code":"template_abnormality( parentname, dataname, arm_var, id_var = \"USUBJID\", by_vars, abnormal = list(low = c(\"LOW\", \"LOW LOW\"), high = c(\"HIGH\", \"HIGH HIGH\")), grade = \"ANRIND\", baseline_var = \"BNRIND\", treatment_flag_var = \"ONTRTFL\", treatment_flag = \"Y\", add_total = FALSE, total_label = default_total_label(), exclude_base_abn = FALSE, drop_arm_levels = TRUE, na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args(), tbl_title )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Abnormality Summary Table — template_abnormality","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. by_vars (character) variable names used split summary rows. abnormal (named list) indicating abnormality direction grades. grade (character) name variable used specify abnormality grade. Variable must factor. baseline_var (character) name variable specifying baseline abnormality grade. treatment_flag_var (character) name treatment flag variable. treatment_flag (character) name value indicating treatment records treatment_flag_var. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). exclude_base_abn (logical) whether exclude patients abnormal values baseline. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. na_level (character) NA level input dataset, defaults \"\". basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). tbl_title (character) Title label variables bars","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Abnormality Summary Table — template_abnormality","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality_by_worst_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"Creates valid expression generate table summarize abnormality grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality_by_worst_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"","code":"template_abnormality_by_worst_grade( parentname, dataname, arm_var, id_var = \"USUBJID\", paramcd = \"PARAMCD\", atoxgr_var = \"ATOXGR\", worst_high_flag_var = \"WGRHIFL\", worst_low_flag_var = \"WGRLOFL\", worst_flag_indicator = \"Y\", add_total = FALSE, total_label = default_total_label(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality_by_worst_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. paramcd (character) name parameter code variable. atoxgr_var (character) name variable indicating Analysis Toxicity Grade. worst_high_flag_var (character) name variable indicating Worst High Grade flag worst_low_flag_var (character) name variable indicating Worst Low Grade flag worst_flag_indicator (character) flag value indicating worst grade. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_abnormality_by_worst_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Laboratory test results with highest grade post-baseline — template_abnormality_by_worst_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_adverse_events.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"Creates valid expression generate adverse events table ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_adverse_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"","code":"template_adverse_events( dataname = \"ANL\", aeterm = \"AETERM\", tox_grade = \"AETOXGR\", causality = \"AEREL\", outcome = \"AEOUT\", action = \"AEACN\", time = \"ASTDY\", decod = NULL, patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_adverse_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"dataname (character) analysis data used teal module. aeterm (character) name reported term adverse event variable. tox_grade (character) name standard toxicity grade variable. causality (character) name causality variable. outcome (character) name outcome adverse event variable. action (character) name action taken study treatment variable. time (character) name study day start adverse event variable. decod (character) name dictionary derived term variable. patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_adverse_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Adverse Events Table and Plot — template_adverse_events","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_ancova.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: ANCOVA Summary — template_ancova","title":"Template: ANCOVA Summary — template_ancova","text":"Creates valid expression generate analysis variance summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_ancova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: ANCOVA Summary — template_ancova","text":"","code":"template_ancova( dataname = \"ANL\", parentname = \"ADSL\", arm_var, ref_arm = NULL, comp_arm = NULL, combine_comp_arms = FALSE, aval_var, label_aval = NULL, cov_var, include_interact = FALSE, interact_var = NULL, interact_y = FALSE, paramcd_levels = \"\", paramcd_var = \"PARAMCD\", label_paramcd = NULL, visit_levels = \"\", visit_var = \"AVISIT\", conf_level = 0.95, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_ancova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: ANCOVA Summary — template_ancova","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. label_aval (character) label value variable used title rendering. cov_var (character) names covariates variables. include_interact (logical) whether interaction term included model. interact_var (character) name variable interactions arm. interaction needed, default option NULL. interact_y (character) selected item interact_var column used select specific ANCOVA results. interaction needed, default option FALSE. paramcd_levels (character) variable levels studied parameter. paramcd_var (character) variable name studied parameter. label_paramcd (character) variable label used title rendering. visit_levels (character) variable levels studied visits. visit_var (character) variable names can used visit variable. Must factor dataname. conf_level (numeric) value confidence level within range (0, 1). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_ancova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: ANCOVA Summary — template_ancova","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_arguments.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard Template Arguments — template_arguments","title":"Standard Template Arguments — template_arguments","text":"documentation function lists arguments teal module templates used repeatedly express analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_arguments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standard Template Arguments — template_arguments","text":"add_total (logical) whether include column total number patients. anl_name (character) analysis data used teal module. arm_var (character) variable names can used arm_var. atirel (character) name time relation medication variable. aval Please use aval_var argument instead. avalu Please use avalu_var argument instead. avalu_var (character) name analysis value unit variable. aval_var (character) name analysis value variable. baseline_var (character) name variable baseline values analysis variable. base_var Please use baseline_var argument instead. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). by_vars (character) variable names used split summary rows. cmdecod (character) name standardized medication name variable. cmindc (character) name indication variable. cmstdy (character) name study relative day start medication variable. cnsr_var (character) name censoring variable. combine_comp_arms (logical) triggers combination comparison arms. compare_arm (logical) triggers comparison study arms. comp_arm (character) level comparison arm case arm comparison. conf_level (numeric) value confidence level within range (0, 1). control (list) list settings analysis. cov_var (character) names covariates variables. dataname (character) analysis data used teal module. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). hlt (character) name variable high level term events. id_var (character) variable name subject id. include_interact (logical) whether interaction term included model. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. llt (character) name variable low level term events. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). na.rm (logical) whether NA values removed prior analysis. numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. paramcd (character) name parameter code variable. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_id (character) patient ID. prune_diff (number) threshold use trimming table using criteria difference rates two columns. prune_freq (number) threshold use trimming table using event incidence rate column. ref_arm (character) level reference arm case arm comparison. sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. strata_var (character) names variables stratified analysis. subgroup_var (character) variable names can used subgroups. sum_vars (character) names variables summarized. time_points (character) time points can used tern::surv_timepoint(). time_unit_var (character) name variable representing time units. title (character) title output. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). treatment_flag (character) name value indicating treatment records treatment_flag_var. treatment_flag_var (character) name treatment flag variable. useNA (character) whether missing data (NA) displayed level. var_labels (named character) optional variable labels relabeling analysis variables. visit_var (character) variable names can used visit variable. Must factor dataname. worst_flag_indicator (character) value indicating worst grade. worst_flag_var (character) name worst flag variable.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_arguments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standard Template Arguments — template_arguments","text":"list expressions generate table plot object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_arguments.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standard Template Arguments — template_arguments","text":"Although function just returns NULL two uses, teal module users provides documentation arguments commonly consistently used framework. developer adds single reference point import roxygen argument description : @inheritParams template_arguments","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_basic_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Basic Info — template_basic_info","title":"Template: Patient Profile Basic Info — template_basic_info","text":"Creates valid expression generate patient profile basic info report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_basic_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Basic Info — template_basic_info","text":"","code":"template_basic_info(dataname = \"ANL\", vars, patient_id = NULL)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_basic_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Basic Info — template_basic_info","text":"dataname (character) analysis data used teal module. vars (character) names variables shown table. patient_id (character) patient ID.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_basic_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Basic Info — template_basic_info","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_binary_outcome.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Binary Outcome — template_binary_outcome","title":"Template: Binary Outcome — template_binary_outcome","text":"Creates valid expression generate binary outcome analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_binary_outcome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Binary Outcome — template_binary_outcome","text":"","code":"template_binary_outcome( dataname, parentname, arm_var, paramcd, ref_arm = NULL, comp_arm = NULL, compare_arm = FALSE, combine_comp_arms = FALSE, aval_var = \"AVALC\", show_rsp_cat = TRUE, responder_val = c(\"Complete Response (CR)\", \"Partial Response (PR)\"), responder_val_levels = responder_val, control = list(global = list(method = \"waldcc\", conf_level = 0.95), unstrat = list(method_ci = \"waldcc\", method_test = \"schouten\", odds = TRUE), strat = list(method_ci = \"cmh\", method_test = \"cmh\", strat = NULL)), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_binary_outcome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Binary Outcome — template_binary_outcome","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) response parameter value use table title. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. show_rsp_cat (logical) display multinomial response estimations. responder_val (character) short label observations translate AVALC responder/non-responder. responder_val_levels (character) levels responses shown multinomial response estimations. control (list) list settings analysis. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_binary_outcome.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Binary Outcome — template_binary_outcome","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_m.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Multi-Variable Cox Regression — template_coxreg_m","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"Creates valid expression generate multi-variable Cox regression analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_m.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"","code":"template_coxreg_m( dataname, cov_var, arm_var, cnsr_var, aval_var, ref_arm, comp_arm, paramcd, at = list(), strata_var = NULL, combine_comp_arms = FALSE, control = control_coxreg(), na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_m.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"dataname (character) analysis data used teal module. cov_var (character) names covariates variables. arm_var (character) variable names can used arm_var. cnsr_var (character) name censoring variable. aval_var (character) name analysis value variable. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. paramcd (character) name parameter code variable. (list numeric) candidate covariate numeric type variable, use specify value covariate effect estimated. strata_var (character) names variables stratified analysis. combine_comp_arms (logical) triggers combination comparison arms. control (list) list settings analysis (see tern::control_coxreg()). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_m.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Multi-Variable Cox Regression — template_coxreg_m","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_u.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Univariable Cox Regression — template_coxreg_u","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"Creates valid expression generate univariable Cox regression analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_u.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"","code":"template_coxreg_u( dataname, cov_var, arm_var, cnsr_var, aval_var, ref_arm, comp_arm, paramcd, at = list(), strata_var = NULL, combine_comp_arms = FALSE, control = control_coxreg(), na_level = default_na_str(), append = FALSE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_u.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"dataname (character) analysis data used teal module. cov_var (character) names covariates variables. arm_var (character) variable names can used arm_var. cnsr_var (character) name censoring variable. aval_var (character) name analysis value variable. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. paramcd (character) name parameter code variable. (list numeric) candidate covariate numeric type variable, use specify value covariate effect estimated. strata_var (character) names variables stratified analysis. combine_comp_arms (logical) triggers combination comparison arms. control (list) list settings analysis (see tern::control_coxreg()). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). append (logical) whether result appended previous one. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_coxreg_u.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Univariable Cox Regression — template_coxreg_u","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Events by Term — template_events","title":"Template: Events by Term — template_events","text":"Creates valid expression generate table events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Events by Term — template_events","text":"","code":"template_events( dataname, parentname, arm_var, hlt, llt, label_hlt = NULL, label_llt = NULL, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", sort_criteria = c(\"freq_desc\", \"alpha\"), sort_freq_col = total_label, prune_freq = 0, prune_diff = 0, drop_arm_levels = TRUE, incl_overall_sum = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Events by Term — template_events","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. hlt (character) name variable high level term events. llt (character) name variable low level term events. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. sort_freq_col (character) column sort frequency sort_criteria set freq_desc. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. incl_overall_sum (flag) whether two rows summarize overall number adverse events included top table. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Events by Term — template_events","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Events by Grade — template_events_by_grade","title":"Template: Events by Grade — template_events_by_grade","text":"Creates valid expression generate table summarize events grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Events by Grade — template_events_by_grade","text":"","code":"template_events_by_grade( dataname, parentname, arm_var, id = \"\", hlt, llt, label_hlt = NULL, label_llt = NULL, grade, label_grade = NULL, prune_freq = 0, prune_diff = 0, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Events by Grade — template_events_by_grade","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. id (character) unique identifier patients datasets, default \"USUBJID\". hlt (character) name variable high level term events. llt (character) name variable low level term events. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. grade (character) name severity level variable. label_grade (string) label grade variable dataname. label extracted module. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Events by Grade — template_events_by_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_col_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"Creates valid expression generate table summarize adverse events grouped grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_col_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"","code":"template_events_col_by_grade( dataname, parentname, arm_var, grading_groups = list(`Any Grade (%)` = c(\"1\", \"2\", \"3\", \"4\", \"5\"), `Grade 1-2 (%)` = c(\"1\", \"2\"), `Grade 3-4 (%)` = c(\"3\", \"4\"), `Grade 5 (%)` = \"5\"), add_total = TRUE, total_label = default_total_label(), id = \"USUBJID\", hlt, llt, label_hlt = NULL, label_llt = NULL, grade = \"AETOXGR\", label_grade = NULL, prune_freq = 0.1, prune_diff = 0, na_level = default_na_str(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_col_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. grading_groups (list) named list grading groups. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). id (character) name variable uniquely identify patients datasets. hlt (character) name variable high level term events. llt (character) name variable low level term events. label_hlt (string) label hlt variable dataname. label extracted module. label_llt (string) label llt variable dataname. label extracted module. grade (character) name grade variable base grading_groups . label_grade (character) label grade variable dataname. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_col_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Adverse Events Grouped by Grade with Threshold — template_events_col_by_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_patyear.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"Creates valid expression generate table event rates adjusted patient-years.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_patyear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"","code":"template_events_patyear( dataname, parentname, arm_var, events_var, label_paramcd, aval_var = \"AVAL\", add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), control = control_incidence_rate(), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_patyear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. events_var (character) name variable number observed events. label_paramcd (character)paramcd variable text use table title. aval_var (character) name analysis value variable. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). control (list) list settings analysis. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_patyear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Event Rates Adjusted for Patient-Years — template_events_patyear","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Adverse Events Summary — template_events_summary","title":"Template: Adverse Events Summary — template_events_summary","text":"Creates valid expression generate adverse events summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Adverse Events Summary — template_events_summary","text":"","code":"template_events_summary( anl_name, parentname, arm_var, dthfl_var = \"DTHFL\", dcsreas_var = \"DCSREAS\", flag_var_anl = NULL, flag_var_aesi = NULL, aeseq_var = \"AESEQ\", llt = \"AEDECOD\", add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), count_dth = TRUE, count_wd = TRUE, count_subj = TRUE, count_pt = TRUE, count_events = TRUE )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Adverse Events Summary — template_events_summary","text":"anl_name (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. dthfl_var (character) name variable subject death flag parentname. Records \"Y\" summarized table row \"Total number deaths\". dcsreas_var (character) name variable study discontinuation reason parentname. Records \"ADVERSE EVENTS\" summarized table row \"Total number patients withdrawn study due AE\". flag_var_anl (character) name flag variable dataset used count adverse event sub-groups (e.g. Serious events, Related events, etc.). Variable labels used table row names exist. flag_var_aesi (character) name flag variable dataset used count adverse event special interest groups. flag variables must type logical. Variable labels used table row names exist. aeseq_var (character) name variable adverse events sequence number dataset. Used counting total number events. llt (character) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). count_dth (logical) whether show count total deaths (based dthfl_var). Defaults TRUE. count_wd (logical) whether show count patients withdrawn study due adverse event (based dcsreas_var). Defaults TRUE. count_subj (logical) whether show count unique subjects (based USUBJID). applies event flag variables provided. count_pt (logical) whether show count unique preferred terms (based llt). applies event flag variables provided. count_events (logical) whether show count events (based aeseq_var). applies event flag variables provided.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_events_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Adverse Events Summary — template_events_summary","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_exposure.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Exposure Table for Risk management plan — template_exposure","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"Creates valid expression generate exposure table risk management plan.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_exposure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"","code":"template_exposure( parentname, dataname, id_var, paramcd, paramcd_label = NULL, row_by_var, col_by_var = NULL, add_total = FALSE, total_label = \"Total\", add_total_row = TRUE, total_row_label = \"Total number of patients and patient time*\", drop_levels = TRUE, na_level = default_na_str(), aval_var, avalu_var, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_exposure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. id_var (character) variable name subject id. paramcd (character) name parameter code variable. paramcd_label (character) column dataname dataset value used label argument paramcd. row_by_var (character) variable name used split values rows. col_by_var (character) variable name used split values columns. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). add_total_row (flag) whether \"total\" level added others includes levels constitute split. custom label can set level via total_row_label argument. total_row_label (character) string display total row label row enabled (see add_total_row). drop_levels (flag) whether empty rows removed table. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). aval_var (character) name analysis value variable. avalu_var (character) name analysis value unit variable. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_exposure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Exposure Table for Risk management plan — template_exposure","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_fit_mmrm.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"Creates valid expression generate analysis tables plots Mixed Model Repeated Measurements.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_fit_mmrm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"","code":"template_fit_mmrm( parentname, dataname, aval_var, arm_var, ref_arm, comp_arm = NULL, combine_comp_arms = FALSE, id_var, visit_var, cov_var, conf_level = 0.95, method = \"Satterthwaite\", cor_struct = \"unstructured\", weights_emmeans = \"proportional\", parallel = FALSE ) template_mmrm_tables( parentname, dataname, fit_name, arm_var, ref_arm, visit_var, paramcd, show_relative = c(\"increase\", \"reduction\", \"none\"), table_type = \"t_mmrm_cov\", total_label = default_total_label(), basic_table_args = teal.widgets::basic_table_args() ) template_mmrm_plots( fit_name, lsmeans_plot = list(select = c(\"estimates\", \"contrasts\"), width = 0.6, show_pval = FALSE), diagnostic_plot = list(type = \"fit-residual\", z_threshold = NULL), ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_fit_mmrm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. aval_var (character) name analysis value variable. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. combine_comp_arms (logical) triggers combination comparison arms. id_var (character) variable name subject id. visit_var (character) variable names can used visit variable. Must factor dataname. cov_var (character) names covariates variables. conf_level (numeric) value confidence level within range (0, 1). method (string) string specifying adjustment method. cor_struct (string) string specifying correlation structure, defaults \"unstructured\". See tern.mmrm::build_formula() options. weights_emmeans argument emmeans::emmeans(), \"proportional\" default. parallel (flag) flag controls whether optimizer search can use available free cores machine (default). fit_name (string) name fitted MMRM object. paramcd (character) name parameter code variable. show_relative (string) \"reduction\" (control - treatment, default) \"increase\" (treatment - control) shown relative change baseline. table_type (string) type table output. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). lsmeans_plot (named list) list controls LS means plot. See tern.mmrm::g_mmrm_lsmeans(). diagnostic_plot (named list) list controls diagnostic_plot. See tern.mmrm::g_mmrm_diagnostic(). ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_fit_mmrm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"list expressions generate table plot object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_fit_mmrm.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Template: Mixed Model Repeated Measurements (MMRM) Analysis — template_fit_mmrm","text":"template_mmrm_tables(): Creates valid expressions generate MMRM LS means, covariance matrix, fixed effects, diagnostic tables. template_mmrm_plots(): Creates valid expressions generate MMRM LS means diagnostic plots.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_rsp.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Response Forest Plot — template_forest_rsp","title":"Template: Response Forest Plot — template_forest_rsp","text":"Creates valid expression generate response forest plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_rsp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Response Forest Plot — template_forest_rsp","text":"","code":"template_forest_rsp( dataname = \"ANL\", parentname = \"ADSL\", arm_var, ref_arm = NULL, comp_arm = NULL, obj_var_name = \"\", aval_var = \"AVALC\", responders = c(\"CR\", \"PR\"), subgroup_var, strata_var = NULL, stats = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"), riskdiff = NULL, conf_level = 0.95, col_symbol_size = NULL, rel_width_forest = 0.25, font_size = 15, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_rsp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Response Forest Plot — template_forest_rsp","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. obj_var_name (character) additional text append table title. aval_var (character) name analysis value variable. responders (character) values aval_var considered responders. subgroup_var (character) variable names can used subgroups. strata_var (character) names variables stratified analysis. stats (character) names statistics reported among: n: Total number observations per group. n_rsp: Number responders per group. prop: Proportion responders. n_tot: Total number observations. : Odds ratio. ci : Confidence interval odds ratio. pval: p-value effect. Note, statistics n_tot, , ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. conf_level (numeric) value confidence level within range (0, 1). col_symbol_size (integer NULL) column index used determine relative size estimator plot symbol. Typically, symbol size proportional sample size used calculate estimator. NULL, symbol size used subgroups. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric(1)) font size. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, caption. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_rsp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Response Forest Plot — template_forest_rsp","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Survival Forest Plot — template_forest_tte","title":"Template: Survival Forest Plot — template_forest_tte","text":"Creates valid expression generate survival forest plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Survival Forest Plot — template_forest_tte","text":"","code":"template_forest_tte( dataname = \"ANL\", parentname = \"ANL_ADSL\", arm_var, ref_arm = NULL, comp_arm = NULL, obj_var_name = \"\", aval_var = \"AVAL\", cnsr_var = \"CNSR\", subgroup_var, strata_var = NULL, stats = c(\"n_tot_events\", \"n_events\", \"median\", \"hr\", \"ci\"), riskdiff = NULL, conf_level = 0.95, col_symbol_size = NULL, time_unit_var = \"AVALU\", rel_width_forest = 0.25, font_size = 15, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Survival Forest Plot — template_forest_tte","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. obj_var_name (character) additional text append table title. aval_var (character) name analysis value variable. cnsr_var (character) name censoring variable. subgroup_var (character) variable names can used subgroups. strata_var (character) names variables stratified analysis. stats (character) names statistics reported among: n_tot_events: Total number events per group. n_events: Number events per group. n_tot: Total number observations per group. n: Number observations per group. median: Median survival time. hr: Hazard ratio. ci: Confidence interval hazard ratio. pval: p-value effect. Note, one statistics n_tot n_tot_events, well hr ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. conf_level (numeric) value confidence level within range (0, 1). col_symbol_size (integer NULL) column index used determine relative size estimator plot symbol. Typically, symbol size proportional sample size used calculate estimator. NULL, symbol size used subgroups. time_unit_var (character) name variable representing time units. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_forest_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Survival Forest Plot — template_forest_tte","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Confidence Interval Plot — template_g_ci","title":"Template: Confidence Interval Plot — template_g_ci","text":"Creates valid expression generate ggplot2::ggplot() confidence interval plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Confidence Interval Plot — template_g_ci","text":"","code":"template_g_ci( dataname, x_var, y_var, grp_var = NULL, stat = c(\"mean\", \"median\"), conf_level = 0.95, unit_var = \"AVALU\", ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Confidence Interval Plot — template_g_ci","text":"dataname (character) analysis data used teal module. x_var (character) name treatment variable put x-axis. y_var (character) name response variable put y-axis. grp_var (character) name group variable used determine plot colors, point shapes, line types. stat (character) statistic plot. Options \"mean\" \"median\". conf_level (numeric) value confidence level within range (0, 1). unit_var (character) name unit variable. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Confidence Interval Plot — template_g_ci","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ipp.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Individual Patient Plots — template_g_ipp","title":"Template: Individual Patient Plots — template_g_ipp","text":"Creates valid expression generate ggplot2::ggplot() plots individual patients.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ipp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Individual Patient Plots — template_g_ipp","text":"","code":"template_g_ipp( dataname = \"ANL\", paramcd, arm_var, arm_levels, avalu_first, paramcd_first, aval_var = \"AVAL\", avalu_var = \"AVALU\", id_var = \"USUBJID\", visit_var = \"AVISIT\", base_var = lifecycle::deprecated(), baseline_var = \"BASE\", add_baseline_hline = FALSE, separate_by_obs = FALSE, ggplot2_args = teal.widgets::ggplot2_args(), suppress_legend = FALSE, add_avalu = TRUE )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ipp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Individual Patient Plots — template_g_ipp","text":"dataname (character) analysis data used teal module. paramcd (character) name parameter code variable. arm_var (character) variable names can used arm_var. arm_levels (character) vector levels arm_var. avalu_first (character)avalu_var text append plot title y-axis label add_avalu TRUE. paramcd_first (character)paramcd text append plot title y-axis label. aval_var (character) name analysis value variable. avalu_var (character) name analysis value unit variable. id_var (character) variable name subject id. visit_var (character) name variable visit timepoints. base_var Please use baseline_var argument instead. baseline_var (character) name variable baseline values analysis variable. add_baseline_hline (logical) whether horizontal line added plot baseline y-value. separate_by_obs (logical) whether create multi-panel plots. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, x, y. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). suppress_legend (logical) whether suppress plot legend. add_avalu (logical) whether avalu_first text appended plot title y-axis label.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_ipp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Individual Patient Plots — template_g_ipp","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_km.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Kaplan-Meier Plot — template_g_km","title":"Template: Kaplan-Meier Plot — template_g_km","text":"Creates valid expression generate Kaplan-Meier plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_km.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Kaplan-Meier Plot — template_g_km","text":"","code":"template_g_km( dataname = \"ANL\", arm_var = \"ARM\", ref_arm = NULL, comp_arm = NULL, compare_arm = FALSE, combine_comp_arms = FALSE, aval_var = \"AVAL\", cnsr_var = \"CNSR\", xticks = NULL, strata_var = NULL, time_points = NULL, facet_var = \"SEX\", font_size = 11, conf_level = 0.95, ties = \"efron\", xlab = \"Survival time\", time_unit_var = \"AVALU\", yval = \"Survival\", ylim = NULL, pval_method = \"log-rank\", annot_surv_med = TRUE, annot_coxph = TRUE, control_annot_surv_med = control_surv_med_annot(), control_annot_coxph = control_coxph_annot(x = 0.27, y = 0.35, w = 0.3), legend_pos = NULL, position_coxph = lifecycle::deprecated(), width_annots = lifecycle::deprecated(), rel_height_plot = 0.8, ci_ribbon = FALSE, title = \"KM Plot\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Kaplan-Meier Plot — template_g_km","text":"dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. cnsr_var (character) name censoring variable. xticks (numeric NULL) numeric vector tick positions single number spacing ticks x-axis. NULL (default), labeling::extended() used determine optimal tick positions x-axis. strata_var (character) names variables stratified analysis. time_points (character) time points can used tern::surv_timepoint(). facet_var (character) name variable use facet plot. font_size (numeric) font size value. conf_level (numeric) value confidence level within range (0, 1). ties (string) among exact (equivalent DISCRETE SAS), efron breslow, see survival::coxph(). Note: equivalent SAS EXACT method R. xlab (string) x-axis label. time_unit_var (character) name variable representing time units. yval (string) type plot, plotted y-axis. Options Survival (default) Failure probability. ylim (numeric(2)) vector containing lower upper limits y-axis, respectively. NULL (default), default scale range used. pval_method (string) method used estimation p.values; wald (default) likelihood. annot_surv_med (flag) compute add annotation table Kaplan-Meier curve estimating median survival time per group. annot_coxph (flag) whether add annotation table survival::coxph() model. control_annot_surv_med (list) parameters control position size annotation table added plot annot_surv_med = TRUE, specified using control_surv_med_annot() function. Parameter options : x, y, w, h, fill. See control_surv_med_annot() details. control_annot_coxph (list) parameters control position size annotation table added plot annot_coxph = TRUE, specified using control_coxph_annot() function. Parameter options : x, y, w, h, fill, ref_lbls. See control_coxph_annot() details. legend_pos (numeric(2) NULL) vector containing x- y-coordinates, respectively, legend position relative KM plot area. NULL (default), legend positioned bottom right corner plot, middle right plot needed prevent overlapping. position_coxph Please use x y elements control_annot_coxph instead. width_annots Please use w element control_annot_surv_med (surv_med) control_annot_coxph (coxph).\" rel_height_plot (proportion) proportion total figure height allocate Kaplan-Meier plot. Relative height patients risk table 1 - rel_height_plot. annot_at_risk = FALSE as_list = TRUE, parameter ignored. ci_ribbon (flag) whether confidence interval drawn around Kaplan-Meier curve. title (character) title output.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_km.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Kaplan-Meier Plot — template_g_km","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_lineplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Line Plot — template_g_lineplot","title":"Template: Line Plot — template_g_lineplot","text":"Creates valid expression generate ggplot2::ggplot() line plot.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_lineplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Line Plot — template_g_lineplot","text":"","code":"template_g_lineplot( dataname = \"ANL\", strata = lifecycle::deprecated(), group_var = \"ARM\", x = \"AVISIT\", y = \"AVAL\", y_unit = \"AVALU\", paramcd = \"PARAMCD\", param = \"ALT\", mid = \"mean\", interval = \"mean_ci\", whiskers = c(\"mean_ci_lwr\", \"mean_ci_upr\"), table = c(\"n\", \"mean_sd\", \"median\", \"range\"), mid_type = \"pl\", conf_level = 0.95, incl_screen = TRUE, mid_point_size = 2, table_font_size = 4, title = \"Line Plot\", y_lab = \"\", ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_lineplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Line Plot — template_g_lineplot","text":"dataname (character) analysis data used teal module. strata Please use group_var argument instead. group_var (string NA) group variable name. x (string) x-variable name. y (string) y-variable name. y_unit (string NA) y-axis unit variable name. paramcd (string NA) parameter code variable name. param (character) parameter filter data . mid (character NULL) names statistics plotted midpoints. statistics indicated mid variable must present object returned sfun, double numeric type vector length one. interval (character NULL) names statistics plotted intervals. statistics indicated interval variable must present object returned sfun, double numeric type vector length two. Set interval = NULL intervals added plot. whiskers (character) names interval whiskers plotted. Names must match names list element interval returned sfun (e.g. mean_ci_lwr element sfun(x)[[\"mean_ci\"]]). possible specify one whisker , suppress whiskers setting interval = NULL. table (character NULL) names statistics displayed table plot. statistics indicated table variable must present object returned sfun. mid_type (string) controls type mid plot, can point (\"p\"), line (\"l\"), point line (\"pl\"). conf_level (numeric) value confidence level within range (0, 1). incl_screen (logical) whether screening visit included. mid_point_size (numeric(1)) font size mid plot points. table_font_size (numeric(1)) font size text table. title (string) plot title. y_lab (string NULL) y-axis label. NULL label added. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, caption, y, lty. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_g_lineplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Line Plot — template_g_lineplot","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_laboratory.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Laboratory Table — template_laboratory","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"Creates valid expression generate patient profile laboratory table using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_laboratory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"","code":"template_laboratory( dataname = \"ANL\", paramcd = \"PARAMCD\", param = \"PARAM\", anrind = \"ANRIND\", timepoints = \"ADY\", aval = lifecycle::deprecated(), aval_var = \"AVAL\", avalu = lifecycle::deprecated(), avalu_var = \"AVALU\", patient_id = NULL, round_value = 0L )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_laboratory.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"dataname (character) analysis data used teal module. paramcd (character) name parameter code variable. param (character) name parameter variable. anrind (character) name analysis reference range indicator variable. timepoints (character) name time variable. aval Please use aval_var argument instead. aval_var (character) name analysis value variable. avalu Please use avalu_var argument instead. avalu_var (character) name analysis value unit variable. patient_id (character) patient ID. round_value (numeric) number decimal places round .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_laboratory.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Laboratory Table — template_laboratory","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Logistic Regression — template_logistic","title":"Template: Logistic Regression — template_logistic","text":"Creates valid expression generate logistic regression table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Logistic Regression — template_logistic","text":"","code":"template_logistic( dataname, arm_var, aval_var, paramcd = lifecycle::deprecated(), label_paramcd, cov_var, interaction_var, ref_arm, comp_arm, topleft = \"Logistic Regression\", conf_level = 0.95, combine_comp_arms = FALSE, responder_val = c(\"CR\", \"PR\"), at = NULL, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Logistic Regression — template_logistic","text":"dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. fit logistic model arm/treatment variable, set NULL. aval_var (character) name analysis value variable. paramcd paramcd argument used function. label_paramcd (character) label response parameter value print table title. cov_var (character) names covariates variables. interaction_var (character) names variables can used interaction variable selection. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. topleft (character) text use top-left annotation table. conf_level (numeric) value confidence level within range (0, 1). combine_comp_arms (logical) triggers combination comparison arms. responder_val (character) values responder variable corresponding successful response. (numeric NULL) optional values interaction variable. Otherwise median used. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Logistic Regression — template_logistic","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_medical_history.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Medical History — template_medical_history","title":"Template: Patient Profile Medical History — template_medical_history","text":"Creates valid expression generate patient profile medical history report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_medical_history.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Medical History — template_medical_history","text":"","code":"template_medical_history( dataname = \"ANL\", mhterm = \"MHTERM\", mhbodsys = \"MHBODSYS\", mhdistat = \"MHDISTAT\", patient_id = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_medical_history.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Medical History — template_medical_history","text":"dataname (character) analysis data used teal module. mhterm (character) name reported term medical history variable. mhbodsys (character) name body system organ class variable. mhdistat (character) name status disease variable. patient_id (character) patient ID.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_medical_history.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Medical History — template_medical_history","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_mult_events.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Multiple Events by Term — template_mult_events","title":"Template: Multiple Events by Term — template_mult_events","text":"Creates valid expression generate table multiple events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_mult_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Multiple Events by Term — template_mult_events","text":"","code":"template_mult_events( dataname, parentname, arm_var, seq_var, hlt, llt, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_mult_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Multiple Events by Term — template_mult_events","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. seq_var (character) name analysis sequence number variable. Used counting unique number events. hlt (character) name variable high level term events. llt (character) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_mult_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Multiple Events by Term — template_mult_events","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_patient_timeline.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Timeline Plot — template_patient_timeline","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"Creates valid expression generate patient profile timeline ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_patient_timeline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"","code":"template_patient_timeline( dataname = \"ANL\", aeterm = \"AETERM\", aetime_start = \"ASTDTM\", aetime_end = \"AENDTM\", dstime_start = \"CMASTDTM\", dstime_end = \"CMAENDTM\", cmdecod = \"CMDECOD\", aerelday_start = NULL, aerelday_end = NULL, dsrelday_start = NULL, dsrelday_end = NULL, relative_day = FALSE, patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_patient_timeline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"dataname (character) analysis data used teal module. aeterm (character) name reported term adverse event variable. aetime_start (character) name start date/time adverse event variable. aetime_end (character) name end date/time adverse event variable. dstime_start (character) name date/time first exposure treatment variable. dstime_end (character) name date/time last exposure treatment variable. cmdecod (character) name standardized medication name variable. aerelday_start (character) name adverse event study start day variable. aerelday_end (character) name adverse event study end day variable. dsrelday_start (character) name concomitant medications study start day variable. dsrelday_end (character) name concomitant medications study day start variable. relative_day (logical) whether use relative days (TRUE) absolute dates (FALSE). patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_patient_timeline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Timeline Plot — template_patient_timeline","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_prior_medication.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Prior Medication — template_prior_medication","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"Creates valid expression generate patient profile prior medication report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_prior_medication.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"","code":"template_prior_medication( dataname = \"ANL\", atirel = \"ATIREL\", cmdecod = \"CMDECOD\", cmindc = \"CMINDC\", cmstdy = \"CMSTDY\" )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_prior_medication.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"dataname (character) analysis data used teal module. atirel (character) name time relation medication variable. cmdecod (character) name standardized medication name variable. cmindc (character) name indication variable. cmstdy (character) name study relative day start medication variable.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_prior_medication.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Prior Medication — template_prior_medication","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Shift by Arm — template_shift_by_arm","title":"Template: Shift by Arm — template_shift_by_arm","text":"Creates valid expression generate summary table analysis indicator levels arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Shift by Arm — template_shift_by_arm","text":"","code":"template_shift_by_arm( dataname, parentname, arm_var = \"ARM\", paramcd = \"PARAMCD\", visit_var = \"AVISIT\", treatment_flag_var = \"ONTRTFL\", treatment_flag = \"Y\", aval_var = \"ANRIND\", base_var = lifecycle::deprecated(), baseline_var = \"BNRIND\", na.rm = FALSE, na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Shift by Arm — template_shift_by_arm","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) name parameter code variable. visit_var (character) variable names can used visit variable. Must factor dataname. treatment_flag_var (character) name treatment flag variable. treatment_flag (character) name value indicating treatment records treatment_flag_var. aval_var (character) name analysis reference range indicator variable. base_var Please use baseline_var argument instead. baseline_var (character) name baseline reference range indicator variable. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Shift by Arm — template_shift_by_arm","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm_by_worst.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"Creates valid expression generate summary table worst analysis indicator variable level per subject arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm_by_worst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"","code":"template_shift_by_arm_by_worst( dataname, parentname, arm_var = \"ARM\", paramcd = \"PARAMCD\", worst_flag_var = \"WORS02FL\", worst_flag = \"Y\", treatment_flag_var = \"ONTRTFL\", treatment_flag = \"Y\", aval_var = \"ANRIND\", base_var = lifecycle::deprecated(), baseline_var = \"BNRIND\", na.rm = FALSE, na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm_by_worst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) name parameter code variable. worst_flag_var (character) name worst flag variable. worst_flag (character) value indicating worst analysis indicator level. treatment_flag_var (character) name treatment flag variable. treatment_flag (character) name value indicating treatment records treatment_flag_var. aval_var (character) name analysis reference range indicator variable. base_var Please use baseline_var argument instead. baseline_var (character) name baseline reference range indicator variable. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_arm_by_worst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Shift by Arm by Worst Analysis Indicator Level — template_shift_by_arm_by_worst","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Grade Summary Table — template_shift_by_grade","title":"Template: Grade Summary Table — template_shift_by_grade","text":"Creates valid expression generate grade summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Grade Summary Table — template_shift_by_grade","text":"","code":"template_shift_by_grade( parentname, dataname, arm_var = \"ARM\", id_var = \"USUBJID\", visit_var = \"AVISIT\", worst_flag_var = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\"), worst_flag_indicator = \"Y\", anl_toxgrade_var = \"ATOXGR\", base_toxgrade_var = \"BTOXGR\", paramcd = \"PARAMCD\", drop_arm_levels = TRUE, add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), code_missing_baseline = FALSE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Grade Summary Table — template_shift_by_grade","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. visit_var (character) variable names can used visit variable. Must factor dataname. worst_flag_var (character) name worst flag variable. worst_flag_indicator (character) value indicating worst grade. anl_toxgrade_var (character) name variable indicating analysis toxicity grade. base_toxgrade_var (character) name variable indicating baseline toxicity grade. paramcd (character) name parameter code variable. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). code_missing_baseline (logical) whether missing baseline grades counted grade 0. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_shift_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Grade Summary Table — template_shift_by_grade","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_smq.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"Creates valid expression generate adverse events table Standardized MedDRA Query.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_smq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"","code":"template_smq( dataname, parentname, arm_var, llt = \"AEDECOD\", add_total = TRUE, total_label = default_total_label(), sort_criteria = c(\"freq_desc\", \"alpha\"), drop_arm_levels = TRUE, na_level = default_na_str(), smq_varlabel = \"Standardized MedDRA Query\", baskets = c(\"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\"), id_var = \"USUBJID\", basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_smq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. llt (character) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). smq_varlabel (character) label use new column SMQ created tern::h_stack_by_baskets(). baskets (character) names selected standardized/customized queries variables. id_var (character) variable name subject id. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_smq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Adverse Events Table by Standardized MedDRA Query — template_smq","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Summary of Variables — template_summary","title":"Template: Summary of Variables — template_summary","text":"Creates valid expression generate table summarize variables.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Summary of Variables — template_summary","text":"","code":"template_summary( dataname, parentname, arm_var, sum_vars, show_labels = lifecycle::deprecated(), add_total = TRUE, total_label = default_total_label(), var_labels = character(), arm_var_labels = NULL, na.rm = FALSE, na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"mean_ci\", \"median\", \"median_ci\", \"quantiles\", \"range\", \"geom_mean\"), denominator = c(\"N\", \"n\", \"omit\"), drop_arm_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Summary of Variables — template_summary","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. sum_vars (character) names variables summarized. show_labels add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). var_labels (named character) optional variable labels relabeling analysis variables. arm_var_labels (character NULL) vector column variable labels display, length arm_var. NULL, labels displayed. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Summary of Variables — template_summary","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary_by.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Summarize Variables by Row Groups Module — template_summary_by","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"Creates valid expression generate table summarize variables row groups.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary_by.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"","code":"template_summary_by( parentname, dataname, arm_var, id_var, sum_vars, by_vars, var_labels = character(), add_total = TRUE, total_label = default_total_label(), parallel_vars = FALSE, row_groups = FALSE, na.rm = FALSE, na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"mean_ci\", \"median\", \"median_ci\", \"quantiles\", \"range\"), denominator = c(\"N\", \"n\", \"omit\"), drop_arm_levels = TRUE, drop_zero_levels = TRUE, basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary_by.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"parentname (character) parent analysis data used teal module, usually refers ADSL. dataname (character) analysis data used teal module. arm_var (character) variable names can used arm_var. id_var (character) variable name subject id. sum_vars (character) names variables summarized. by_vars (character) variable names used split summary rows. var_labels (named character) optional variable labels relabeling analysis variables. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). parallel_vars (logical) whether summarized variables arranged columns. Can set TRUE chosen analysis variables numeric. row_groups (logical) whether summarized variables arranged row groups. na.rm (logical) whether NA values removed prior analysis. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. drop_zero_levels (logical) whether rows zero counts columns removed table. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_summary_by.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Summarize Variables by Row Groups Module — template_summary_by","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_therapy.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Therapy Table and Plot — template_therapy","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"Creates valid expression generate patient profile therapy table ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_therapy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"","code":"template_therapy( dataname = \"ANL\", atirel = \"ATIREL\", cmdecod = \"CMDECOD\", cmindc = \"CMINDC\", cmdose = \"CMDOSE\", cmtrt = \"CMTRT\", cmdosu = \"CMDOSU\", cmroute = \"CMROUTE\", cmdosfrq = \"CMDOSFRQ\", cmstdy = \"CMSTDY\", cmendy = \"CMENDY\", patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_therapy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"dataname (character) analysis data used teal module. atirel (character) name time relation medication variable. cmdecod (character) name standardized medication name variable. cmindc (character) name indication variable. cmdose (character) name dose per administration variable. cmtrt (character) name reported name drug, med, therapy variable. cmdosu (character) name dose units variable. cmroute (character) name route administration variable. cmdosfrq (character) name dosing frequency per interval variable. cmstdy (character) name study relative day start medication variable. cmendy (character) name study day end medication variable. patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_therapy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Therapy Table and Plot — template_therapy","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Time-To-Event — template_tte","title":"Template: Time-To-Event — template_tte","text":"Creates valid expression generate time--event analysis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Time-To-Event — template_tte","text":"","code":"template_tte( dataname = \"ANL\", parentname = \"ADSL\", arm_var = \"ARM\", paramcd, ref_arm = NULL, comp_arm = NULL, compare_arm = FALSE, combine_comp_arms = FALSE, aval_var = \"AVAL\", cnsr_var = \"CNSR\", strata_var = NULL, time_points = NULL, time_unit_var = \"AVALU\", event_desc_var = \"EVNTDESC\", control = control_tte(), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Time-To-Event — template_tte","text":"dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (character) variable names can used arm_var. paramcd (character) endpoint parameter value use table title. ref_arm (character) level reference arm case arm comparison. comp_arm (character) level comparison arm case arm comparison. compare_arm (logical) triggers comparison study arms. combine_comp_arms (logical) triggers combination comparison arms. aval_var (character) name analysis value variable. cnsr_var (character) name censoring variable. strata_var (character) names variables stratified analysis. time_points (character) time points can used tern::surv_timepoint(). time_unit_var (character) name variable representing time units. event_desc_var (character) name variable events description. control (list) list settings analysis. See control_tte() details. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Time-To-Event — template_tte","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_vitals.html","id":null,"dir":"Reference","previous_headings":"","what":"Template: Patient Profile Vitals Plot — template_vitals","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"Creates valid expression generate patient profile vitals ggplot2::ggplot() plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_vitals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"","code":"template_vitals( dataname = \"ANL\", paramcd = \"PARAMCD\", paramcd_levels = c(\"SYSBP\", \"DIABP\", \"PUL\", \"RESP\", \"OXYSAT\", \"WGHT\", \"TEMP\"), xaxis = \"ADY\", aval = lifecycle::deprecated(), aval_var = \"AVAL\", patient_id, font_size = 12L, ggplot2_args = teal.widgets::ggplot2_args() )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_vitals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"dataname (character) analysis data used teal module. paramcd (character) name parameter code variable. paramcd_levels (character) vector levels paramcd. xaxis (character) name time variable put x-axis. aval Please use aval_var argument instead. aval_var (character) name analysis value variable. patient_id (character) patient ID. font_size (numeric) font size value. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\").","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/template_vitals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template: Patient Profile Vitals Plot — template_vitals","text":"list expressions generate table plot object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_gee.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"module produces analysis table using Generalized Estimating Equations (GEE).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_gee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"","code":"tm_a_gee( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), aval_var, id_var, arm_var, visit_var, cov_var, arm_ref_comp = NULL, paramcd, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_gee.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. id_var (teal.transform::choices_selected()) object specifying variable name subject id. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_gee.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_gee.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_gee.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_gee.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Generalized Estimating Equations (GEE) analysis — tm_a_gee","text":"","code":"library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following object is masked from ‘package:testthat’: #> #> matches #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADQS <- tmc_ex_adqs %>% filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>% mutate( AVISIT = as.factor(AVISIT), AVISITN = rank(AVISITN) %>% as.factor() %>% as.numeric() %>% as.factor(), AVALBIN = AVAL < 50 # Just as an example to get a binary endpoint. ) %>% droplevels() }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_a_gee( label = \"GEE\", dataname = \"ADQS\", aval_var = choices_selected(\"AVALBIN\", fixed = TRUE), id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"), arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"), paramcd = choices_selected( choices = value_choices(data[[\"ADQS\"]], \"PARAMCD\", \"PARAM\"), selected = \"FKSI-FWB\" ), cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL) ) ) ) #> Initializing tm_a_gee (prototype) #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"module produces analysis tables plots Mixed Model Repeated Measurements.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"","code":"tm_a_mmrm( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), aval_var, id_var, arm_var, visit_var, cov_var, arm_ref_comp = NULL, paramcd, method = teal.transform::choices_selected(c(\"Satterthwaite\", \"Kenward-Roger\", \"Kenward-Roger-Linear\"), \"Satterthwaite\", keep_order = TRUE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), plot_height = c(700L, 200L, 2000L), plot_width = NULL, total_label = default_total_label(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. id_var (teal.transform::choices_selected()) object specifying variable name subject id. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. method (teal.transform::choices_selected()) object available choices pre-selected option adjustment method. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings plots named list ggplot2_args objects plot-specific settings. List names match following: c(\"default\", \"lsmeans\", \"diagnostic\"). argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see help vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"ordering input data sets can lead slightly different numerical results different convergence behavior. known observation used package lme4. However, convergence achieved, results reliable numerical precision.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"module generates following objects, can modified place using decorators: lsmeans_plot (ggplot2) diagnostic_plot (TableTree- output rtables::build_table) lsmeans_table (TableTree- output rtables::build_table) covariance_table (TableTree- output rtables::build_table) fixed_effects_table (TableTree- output rtables::build_table) diagnostic_table (TableTree- output rtables::build_table) Decorators can applied outputs specific objects using named list teal_transform_module objects. \"default\" name reserved decorators applied outputs. See code snippet :","code":"tm_a_mrmm( ..., # arguments for module decorators = list( default = list(teal_transform_module(...)), # applied to all outputs lsmeans_plot = list(teal_transform_module(...)) # applied only to `lsmeans_plot` output diagnostic_plot = list(teal_transform_module(...)) # applied only to `diagnostic_plot` output lsmeans_table = list(teal_transform_module(...)) # applied only to `lsmeans_table` output covariance_table = list(teal_transform_module(...)) # applied only to `covariance_table` output fixed_effects_table = list(teal_transform_module(...)) # applied only to `fixed_effects_table` output diagnostic_table = list(teal_transform_module(...)) # applied only to `diagnostic_table` output ) )"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_a_mmrm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Mixed Model Repeated Measurements (MMRM) Analysis — tm_a_mmrm","text":"","code":"library(dplyr) arm_ref_comp <- list( ARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADQS <- tmc_ex_adqs %>% filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>% filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>% mutate( AVISIT = as.factor(AVISIT), AVISITN = rank(AVISITN) %>% as.factor() %>% as.numeric() %>% as.factor() #' making consecutive numeric factor ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_a_mmrm( label = \"MMRM\", dataname = \"ADQS\", aval_var = choices_selected(c(\"AVAL\", \"CHG\"), \"AVAL\"), id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"), arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( choices = value_choices(data[[\"ADQS\"]], \"PARAMCD\", \"PARAM\"), selected = \"FKSI-FWB\" ), cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL) ) ) ) #> Initializing tm_a_mmrm #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"module produces ggplot2::ggplot() type bar chart summary table counts per category.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"","code":"tm_g_barchart_simple( x = NULL, fill = NULL, x_facet = NULL, y_facet = NULL, label = \"Count Barchart\", plot_options = NULL, plot_height = c(600L, 200L, 2000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"x (data_extract_spec) variable x-axis. fill (data_extract_spec) grouping variable determine bar colors. x_facet (data_extract_spec) row-wise faceting groups. y_facet (data_extract_spec) column-wise faceting groups. label (character) menu item label module teal app. plot_options (list) list plot options. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"Categories can defined four levels deep defined x, fill, x_facet, y_facet parameters. parameters set NULL (default) ignored.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_barchart_simple.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Simple Bar Chart and Table of Counts per Category — tm_g_barchart_simple","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl %>% mutate(ITTFL = factor(\"Y\") %>% with_label(\"Intent-To-Treat Population Flag\")) ADAE <- tmc_ex_adae %>% filter(!((AETOXGR == 1) & (AESEV == \"MILD\") & (ARM == \"A: Drug X\"))) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_g_barchart_simple( label = \"ADAE Analysis\", x = data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = \"ACTARM\", multiple = FALSE ) ), fill = list( data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = \"SEX\", multiple = FALSE ) ), data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\", \"AESER\")), selected = NULL, multiple = FALSE ) ) ), x_facet = list( data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\", \"AESER\")), selected = \"AETOXGR\", multiple = FALSE ) ), data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = NULL, multiple = FALSE ) ) ), y_facet = list( data_extract_spec( dataname = \"ADAE\", select = select_spec( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\", \"AESER\")), selected = \"AESEV\", multiple = FALSE ) ), data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = variable_choices( ADSL, c( \"ARM\", \"ACTARM\", \"SEX\", \"RACE\", \"ITTFL\", \"SAFFL\", \"STRATA2\" ) ), selected = NULL, multiple = FALSE ) ) ) ) ) ) #> Initializing tm_g_barchart_simple #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Confidence Interval Plot — tm_g_ci","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"module produces ggplot2::ggplot() type confidence interval plot consistent TLG Catalog template CIG01 available .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"","code":"tm_g_ci( label, x_var, y_var, color, stat = c(\"mean\", \"median\"), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), plot_height = c(700L, 200L, 2000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"label (character) menu item label module teal app. x_var (character) name treatment variable put x-axis. y_var (character) name response variable put y-axis. color (data_extract_spec) group variable used determine plot colors, shapes, line types. stat (character) statistic plot. Options \"mean\" \"median\". conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ci.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ci.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Confidence Interval Plot — tm_g_ci","text":"","code":"library(nestcolor) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_g_ci( label = \"Confidence Interval Plot\", x_var = data_extract_spec( dataname = \"ADSL\", select = select_spec( choices = c(\"ARMCD\", \"BMRKR2\"), selected = c(\"ARMCD\"), multiple = FALSE, fixed = FALSE ) ), y_var = data_extract_spec( dataname = \"ADLB\", filter = list( filter_spec( vars = \"PARAMCD\", choices = levels(ADLB$PARAMCD), selected = levels(ADLB$PARAMCD)[1], multiple = FALSE, label = \"Select lab:\" ), filter_spec( vars = \"AVISIT\", choices = levels(ADLB$AVISIT), selected = levels(ADLB$AVISIT)[1], multiple = FALSE, label = \"Select visit:\" ) ), select = select_spec( label = \"Analyzed Value\", choices = c(\"AVAL\", \"CHG\"), selected = \"AVAL\", multiple = FALSE, fixed = FALSE ) ), color = data_extract_spec( dataname = \"ADSL\", select = select_spec( label = \"Color by variable\", choices = c(\"SEX\", \"STRATA1\", \"STRATA2\"), selected = c(\"STRATA1\"), multiple = FALSE, fixed = FALSE ) ) ) ) ) #> Initializing tm_g_ci #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_rsp.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Forest Response Plot — tm_g_forest_rsp","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"module produces grid-style forest plot response data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_rsp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"","code":"tm_g_forest_rsp( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALC\"), \"AVALC\", fixed = TRUE), subgroup_var, strata_var, stats = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"), riskdiff = NULL, fixed_symbol_size = TRUE, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), default_responses = c(\"CR\", \"PR\", \"Y\", \"Complete Response (CR)\", \"Partial Response (PR)\"), plot_height = c(500L, 200L, 2000L), plot_width = c(1500L, 800L, 3000L), rel_width_forest = c(25L, 0L, 100L), font_size = c(15L, 1L, 30L), pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_rsp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. subgroup_var (teal.transform::choices_selected()) object available choices preselected option variable names can used default subgroups. strata_var (teal.transform::choices_selected()) names variables stratified analysis. stats (character) names statistics reported among: n: Total number observations per group. n_rsp: Number responders per group. prop: Proportion responders. n_tot: Total number observations. : Odds ratio. ci : Confidence interval odds ratio. pval: p-value effect. Note, statistics n_tot, , ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. fixed_symbol_size (logical) (TRUE), symbol size used plotting estimate. Otherwise, symbol size proportional sample size subgroup. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). default_responses (list character) defines default codes response variable module per value paramcd. passed vector transmitted paramcd values. passed list must named contain arrays, name corresponding single value paramcd. array may contain default response values named arrays rsp default selected response values levels default level choices. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric(1)) font size. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, caption. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_rsp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_rsp.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_rsp.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_rsp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Forest Response Plot — tm_g_forest_rsp","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADRS <- tmc_ex_adrs %>% mutate(AVALC = d_onco_rsp_label(AVALC) %>% with_label(\"Character Result/Finding\")) %>% filter(PARAMCD != \"OVRINV\" | AVISIT == \"FOLLOW UP\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADRS <- data[[\"ADRS\"]] arm_ref_comp <- list( ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ), ARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) app <- init( data = data, modules = modules( tm_g_forest_rsp( label = \"Forest Response\", dataname = \"ADRS\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), \"ARMCD\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADRS, \"PARAMCD\", \"PARAM\"), \"INVET\" ), subgroup_var = choices_selected( variable_choices(ADSL, names(ADSL)), c(\"BMRKR2\", \"SEX\") ), strata_var = choices_selected( variable_choices(ADSL, c(\"STRATA1\", \"STRATA2\")), \"STRATA2\" ), plot_height = c(600L, 200L, 2000L), default_responses = list( BESRSPI = list( rsp = c(\"Stable Disease (SD)\", \"Not Evaluable (NE)\"), levels = c( \"Complete Response (CR)\", \"Partial Response (PR)\", \"Stable Disease (SD)\", \"Progressive Disease (PD)\", \"Not Evaluable (NE)\" ) ), INVET = list( rsp = c(\"Complete Response (CR)\", \"Partial Response (PR)\"), levels = c( \"Complete Response (CR)\", \"Not Evaluable (NE)\", \"Partial Response (PR)\", \"Progressive Disease (PD)\", \"Stable Disease (SD)\" ) ), OVRINV = list( rsp = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\"), levels = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\", \"Not Evaluable (NE)\") ) ) ) ) ) #> Initializing tm_g_forest_rsp #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Forest Survival Plot — tm_g_forest_tte","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"module produces grid-style forest plot time--event data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"","code":"tm_g_forest_tte( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, subgroup_var, paramcd, strata_var, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), stats = c(\"n_tot_events\", \"n_events\", \"median\", \"hr\", \"ci\"), riskdiff = NULL, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), time_unit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), fixed_symbol_size = TRUE, plot_height = c(500L, 200L, 2000L), plot_width = c(1500L, 800L, 3000L), rel_width_forest = c(25L, 0L, 100L), font_size = c(15L, 1L, 30L), pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. subgroup_var (teal.transform::choices_selected()) object available choices preselected option variable names can used default subgroups. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. stats (character) names statistics reported among: n_tot_events: Total number events per group. n_events: Number events per group. n_tot: Total number observations per group. n: Number observations per group. median: Median survival time. hr: Hazard ratio. ci: Confidence interval hazard ratio. pval: p-value effect. Note, one statistics n_tot n_tot_events, well hr ci required. riskdiff (list) risk (proportion) difference column added, list settings apply within column. See tern::control_riskdiff() details. NULL, risk difference column added. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. fixed_symbol_size (logical) (TRUE), symbol size used plotting estimate. Otherwise, symbol size proportional sample size subgroup. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. rel_width_forest (proportion) proportion total width allocate forest plot. Relative width table 1 - rel_width_forest. as_list = TRUE, parameter ignored. font_size (numeric(1)) font size. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_tte.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_tte.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_forest_tte.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Forest Survival Plot — tm_g_forest_tte","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte ADSL$RACE <- droplevels(ADSL$RACE) %>% with_label(\"Race\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] arm_ref_comp <- list( ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ), ARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) app <- init( data = data, modules = modules( tm_g_forest_tte( label = \"Forest Survival\", dataname = \"ADTTE\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), \"ARMCD\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), subgroup_var = choices_selected( variable_choices(ADSL, names(ADSL)), c(\"BMRKR2\", \"SEX\") ), strata_var = choices_selected( variable_choices(ADSL, c(\"STRATA1\", \"STRATA2\")), \"STRATA2\" ) ) ) ) #> Initializing tm_g_forest_tte #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ipp.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Individual Patient Plots — tm_g_ipp","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"module produces ggplot2::ggplot() type individual patient plots display trends parameter values time patient, using data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ipp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"","code":"tm_g_ipp( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, paramcd, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"USUBJID\"), \"USUBJID\", fixed = TRUE), visit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVISIT\"), \"AVISIT\", fixed = TRUE), aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), avalu_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), base_var = lifecycle::deprecated(), baseline_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"BASE\"), \"BASE\", fixed = TRUE), add_baseline_hline = FALSE, separate_by_obs = FALSE, suppress_legend = FALSE, add_avalu = TRUE, plot_height = c(1200L, 400L, 5000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ipp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable values can used arm variable. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. id_var (teal.transform::choices_selected()) object specifying variable name subject id. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. base_var Please use baseline_var argument instead. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. add_baseline_hline (logical) whether horizontal line added plot baseline y-value. separate_by_obs (logical) whether create multi-panel plots. suppress_legend (logical) whether suppress plot legend. add_avalu (logical) whether avalu_first text appended plot title y-axis label. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, x, y. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ipp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ipp.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ipp.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_ipp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Individual Patient Plots — tm_g_ipp","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl %>% slice(1:20) %>% df_explicit_na() ADLB <- tmc_ex_adlb %>% filter(USUBJID %in% ADSL$USUBJID) %>% df_explicit_na() %>% filter(AVISIT != \"SCREENING\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_g_ipp( label = \"Individual Patient Plot\", dataname = \"ADLB\", arm_var = choices_selected( value_choices(ADLB, \"ARMCD\"), \"ARM A\" ), paramcd = choices_selected( value_choices(ADLB, \"PARAMCD\"), \"ALT\" ), aval_var = choices_selected( variable_choices(ADLB, c(\"AVAL\", \"CHG\")), \"AVAL\" ), avalu_var = choices_selected( variable_choices(ADLB, c(\"AVALU\")), \"AVALU\", fixed = TRUE ), id_var = choices_selected( variable_choices(ADLB, c(\"USUBJID\")), \"USUBJID\", fixed = TRUE ), visit_var = choices_selected( variable_choices(ADLB, c(\"AVISIT\")), \"AVISIT\" ), baseline_var = choices_selected( variable_choices(ADLB, c(\"BASE\")), \"BASE\", fixed = TRUE ), add_baseline_hline = FALSE, separate_by_obs = FALSE ) ) ) #> Initializing tm_g_ipp #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_km.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Kaplan-Meier Plot — tm_g_km","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"module produces ggplot-style Kaplan-Meier plot data ADaM structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_km.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"","code":"tm_g_km( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, strata_var, facet_var, time_unit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), font_size = c(11L, 1L, 30), control_annot_surv_med = control_surv_med_annot(), control_annot_coxph = control_coxph_annot(x = 0.27, y = 0.35, w = 0.3), legend_pos = c(0.9, 0.5), rel_height_plot = c(80L, 0L, 100L), plot_height = c(800L, 400L, 5000L), plot_width = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. facet_var (teal.transform::choices_selected()) object available choices preselected option names variable can used plot faceting. time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). font_size (numeric) numeric vector length 3 current, minimum maximum font size values. control_annot_surv_med (list) parameters control position size annotation table added plot annot_surv_med = TRUE, specified using control_surv_med_annot() function. Parameter options : x, y, w, h, fill. See control_surv_med_annot() details. control_annot_coxph (list) parameters control position size annotation table added plot annot_coxph = TRUE, specified using control_coxph_annot() function. Parameter options : x, y, w, h, fill, ref_lbls. See control_coxph_annot() details. legend_pos (numeric(2) NULL) vector containing x- y-coordinates, respectively, legend position relative KM plot area. NULL (default), legend positioned bottom right corner plot, middle right plot needed prevent overlapping. rel_height_plot (proportion) proportion total figure height allocate Kaplan-Meier plot. Relative height patients risk table 1 - rel_height_plot. annot_at_risk = FALSE as_list = TRUE, parameter ignored. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_km.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_km.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_km.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Kaplan-Meier Plot — tm_g_km","text":"","code":"library(nestcolor) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) app <- init( data = data, modules = modules( tm_g_km( label = \"Kaplan-Meier Plot\", dataname = \"ADTTE\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\" ), paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), arm_ref_comp = arm_ref_comp, strata_var = choices_selected( variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")), \"SEX\" ), facet_var = choices_selected( variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")), NULL ) ) ) ) #> Initializing tm_g_km #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_lineplot.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Line Plot — tm_g_lineplot","title":"teal Module: Line Plot — tm_g_lineplot","text":"module produces ggplot2::ggplot() type line plot, optional summary table, standard ADaM data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_lineplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Line Plot — tm_g_lineplot","text":"","code":"tm_g_lineplot( label, dataname, parentname = NULL, strata = lifecycle::deprecated(), group_var = teal.transform::choices_selected(teal.transform::variable_choices(parentname, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\"), x = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVISIT\"), \"AVISIT\", fixed = TRUE), y = teal.transform::choices_selected(teal.transform::variable_choices(dataname, c(\"AVAL\", \"BASE\", \"CHG\", \"PCHG\")), \"AVAL\"), y_unit = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), paramcd = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"PARAMCD\"), \"PARAMCD\", fixed = TRUE), param = teal.transform::choices_selected(teal.transform::value_choices(dataname, \"PARAMCD\", \"PARAM\"), \"ALT\"), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), interval = \"mean_ci\", mid = \"mean\", whiskers = c(\"mean_ci_lwr\", \"mean_ci_upr\"), table = c(\"n\", \"mean_sd\", \"median\", \"range\"), mid_type = \"pl\", mid_point_size = c(2, 1, 5), table_font_size = c(4, 2, 6), plot_height = c(1000L, 200L, 4000L), plot_width = NULL, pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_lineplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Line Plot — tm_g_lineplot","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. strata Please use group_var argument instead. group_var (string NA) group variable name. x (string) x-variable name. y (string) y-variable name. y_unit (string NA) y-axis unit variable name. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. param (character) parameter filter data . conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). interval (character NULL) names statistics plotted intervals. statistics indicated interval variable must present object returned sfun, double numeric type vector length two. Set interval = NULL intervals added plot. mid (character NULL) names statistics plotted midpoints. statistics indicated mid variable must present object returned sfun, double numeric type vector length one. whiskers (character) names interval whiskers plotted. Names must match names list element interval returned sfun (e.g. mean_ci_lwr element sfun(x)[[\"mean_ci\"]]). possible specify one whisker , suppress whiskers setting interval = NULL. table (character NULL) names statistics displayed table plot. statistics indicated table variable must present object returned sfun. mid_type (string) controls type mid plot, can point (\"p\"), line (\"l\"), point line (\"pl\"). mid_point_size (numeric(1)) font size mid plot points. table_font_size (numeric(1)) font size text table. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. module, argument accept ggplot2_args object labs list following child elements: title, subtitle, caption, y, lty. elements taken account. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_lineplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Line Plot — tm_g_lineplot","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_lineplot.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Line Plot — tm_g_lineplot","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_lineplot.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Line Plot — tm_g_lineplot","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_lineplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Line Plot — tm_g_lineplot","text":"","code":"library(nestcolor) library(dplyr) library(forcats) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb %>% mutate(AVISIT == fct_reorder(AVISIT, AVISITN, min)) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_g_lineplot( label = \"Line Plot\", dataname = \"ADLB\", group_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\" ), y = choices_selected( variable_choices(ADLB, c(\"AVAL\", \"BASE\", \"CHG\", \"PCHG\")), \"AVAL\" ), param = choices_selected( value_choices(ADLB, \"PARAMCD\", \"PARAM\"), \"ALT\" ) ) ) ) #> Initializing tm_g_lineplot #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_adverse_events.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"module produces adverse events table ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_adverse_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"","code":"tm_g_pp_adverse_events( label, dataname = \"ADAE\", parentname = \"ADSL\", patient_col = \"USUBJID\", aeterm = NULL, tox_grade = NULL, causality = NULL, outcome = NULL, action = NULL, time = NULL, decod = 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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_adverse_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. aeterm (teal.transform::choices_selected()) object available choices preselected option AETERM variable dataname. tox_grade (teal.transform::choices_selected()) object available choices preselected option AETOXGR variable dataname. causality (teal.transform::choices_selected()) object available choices preselected option AEREL variable dataname. outcome (teal.transform::choices_selected()) object available choices preselected option AEOUT variable dataname. action (teal.transform::choices_selected()) object available choices preselected option AEACN variable dataname. time (teal.transform::choices_selected()) object available choices preselected option ASTDY variable dataname. decod (teal.transform::choices_selected()) object available choices preselected option AEDECOD variable dataname. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_adverse_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_adverse_events.html","id":"decorating-modules","dir":"Reference","previous_headings":"","what":"Decorating Modules","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"module generates following objects, can modified place using decorators:: plot (ggplot2) table (listing_df - output rlistings::as_listing) Decorators can applied outputs specific objects using named list teal_transform_module objects. \"default\" name reserved decorators applied outputs. See code snippet : additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":"tm_g_pp_adverse_events( ..., # arguments for module decorators = list( default = list(teal_transform_module(...)), # applied to all outputs plot = list(teal_transform_module(...)), # applied only to `plot` output table = list(teal_transform_module(...)) # applied only to `table` output ) )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_adverse_events.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_adverse_events.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Adverse Events Table and Plot — tm_g_pp_adverse_events","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADAE <- tmc_ex_adae ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADAE$USUBJID) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_g_pp_adverse_events( label = \"Adverse Events\", dataname = \"ADAE\", parentname = \"ADSL\", patient_col = \"USUBJID\", plot_height = c(600L, 200L, 2000L), aeterm = choices_selected( choices = variable_choices(ADAE, \"AETERM\"), selected = \"AETERM\" ), tox_grade = choices_selected( choices = variable_choices(ADAE, \"AETOXGR\"), selected = \"AETOXGR\" ), causality = choices_selected( choices = variable_choices(ADAE, \"AEREL\"), selected = \"AEREL\" ), outcome = choices_selected( choices = variable_choices(ADAE, \"AEOUT\"), selected = \"AEOUT\" ), action = choices_selected( choices = variable_choices(ADAE, \"AEACN\"), selected = \"AEACN\" ), time = choices_selected( choices = variable_choices(ADAE, \"ASTDY\"), selected = \"ASTDY\" ), decod = NULL ) ) ) #> Initializing tm_g_pp_adverse_events #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_patient_timeline.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"module produces patient profile timeline ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_patient_timeline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"","code":"tm_g_pp_patient_timeline( label, dataname_adcm = \"ADCM\", dataname_adae = \"ADAE\", parentname = \"ADSL\", patient_col = \"USUBJID\", aeterm = NULL, cmdecod = NULL, aetime_start = NULL, aetime_end = NULL, dstime_start = NULL, dstime_end = NULL, aerelday_start = NULL, aerelday_end = NULL, dsrelday_start = NULL, dsrelday_end = 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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_patient_timeline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"label (character) menu item label module teal app. dataname_adcm (character) name ADCM dataset equivalent. dataname_adae (character) name ADAE dataset equivalent. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. aeterm (teal.transform::choices_selected()) object available choices preselected option AETERM variable dataname. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname_adcm. aetime_start (teal.transform::choices_selected()) object available choices preselected option ASTDTM variable dataname_adae. aetime_end (teal.transform::choices_selected()) object available choices preselected option AENDTM variable dataname_adae. dstime_start (teal.transform::choices_selected()) object available choices preselected option CMASTDTM variable dataname_adcm. dstime_end (teal.transform::choices_selected()) object available choices preselected option CMAENDTM variable dataname_adcm. aerelday_start (teal.transform::choices_selected()) object available choices preselected option ASTDY variable dataname_adae. aerelday_end (teal.transform::choices_selected()) object available choices preselected option AENDY variable dataname_adae. dsrelday_start (teal.transform::choices_selected()) object available choices preselected option ASTDY variable dataname_adcm. dsrelday_end (teal.transform::choices_selected()) object available choices preselected option AENDY variable dataname_adcm. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_patient_timeline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_patient_timeline.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_patient_timeline.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_patient_timeline.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Timeline Plot — tm_g_pp_patient_timeline","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADAE <- tmc_ex_adae ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADAE$USUBJID) ADCM <- tmc_ex_adcm %>% mutate( CMSTDY = case_when( CMCAT == \"medcl B\" ~ 20, CMCAT == \"medcl C\" ~ 150, TRUE ~ 1 ) %>% with_label(\"Study Day of Start of Medication\"), CMENDY = case_when( CMCAT == \"medcl B\" ~ 700, CMCAT == \"medcl C\" ~ 1000, TRUE ~ 500 ) %>% with_label(\"Study Day of End of Medication\"), CMASTDTM = ASTDTM, CMAENDTM = AENDTM ) }) join_keys(data) <- default_cdisc_join_keys[c(\"ADSL\", \"ADAE\", \"ADCM\")] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys join_keys(data)[\"ADAE\", \"ADCM\"] <- c(\"STUDYID\", \"USUBJID\") app <- init( data = data, modules = modules( tm_g_pp_patient_timeline( label = \"Patient Timeline\", dataname_adae = \"ADAE\", dataname_adcm = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", plot_height = c(600L, 200L, 2000L), cmdecod = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"CMDECOD\"), selected = \"CMDECOD\", ), aeterm = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"AETERM\"), selected = c(\"AETERM\") ), aetime_start = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"ASTDTM\"), selected = c(\"ASTDTM\") ), aetime_end = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"AENDTM\"), selected = c(\"AENDTM\") ), dstime_start = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"CMASTDTM\"), selected = c(\"CMASTDTM\") ), dstime_end = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"CMAENDTM\"), selected = c(\"CMAENDTM\") ), aerelday_start = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"ASTDY\"), selected = c(\"ASTDY\") ), aerelday_end = choices_selected( choices = variable_choices(data[[\"ADAE\"]], \"AENDY\"), selected = c(\"AENDY\") ), dsrelday_start = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"ASTDY\"), selected = c(\"ASTDY\") ), dsrelday_end = choices_selected( choices = variable_choices(data[[\"ADCM\"]], \"AENDY\"), selected = c(\"AENDY\") ) ) ) ) #> Initializing tm_g_pp_patient_timeline #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_therapy.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"module produces patient profile therapy table ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_therapy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"","code":"tm_g_pp_therapy( label, dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", atirel = NULL, cmdecod = NULL, cmindc = NULL, cmdose = NULL, cmtrt = NULL, cmdosu = NULL, cmroute = NULL, cmdosfrq = NULL, cmstdy = NULL, cmendy = 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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_therapy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. atirel (teal.transform::choices_selected()) object available choices preselected option ATIREL variable dataname. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname. cmindc (teal.transform::choices_selected()) object available choices preselected option CMINDC variable dataname. cmdose (teal.transform::choices_selected()) object available choices preselected option CMDOSE variable dataname. cmtrt (teal.transform::choices_selected()) object available choices preselected option CMTRT variable dataname. cmdosu (teal.transform::choices_selected()) object available choices preselected option CMDOSU variable dataname. cmroute (teal.transform::choices_selected()) object available choices preselected option CMROUTE variable dataname. cmdosfrq (teal.transform::choices_selected()) object available choices preselected option CMDOSFRQ variable dataname. cmstdy (teal.transform::choices_selected()) object available choices preselected option CMSTDY variable dataname. cmendy (teal.transform::choices_selected()) object available choices preselected option CMENDY variable dataname. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_therapy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_therapy.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"module generates following objects, can modified place using decorators:: plot (ggplot2) table (listing_df - output rlistings::as_listing) Decorators can applied outputs specific objects using named list teal_transform_module objects. \"default\" name reserved decorators applied outputs. See code snippet : additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":"tm_g_pp_therapy( ..., # arguments for module decorators = list( default = list(teal_transform_module(...)), # applied to all outputs plot = list(teal_transform_module(...)), # applied only to `plot` output table = list(teal_transform_module(...)) # applied only to `table` output ) )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_therapy.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_therapy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Therapy Table and Plot — tm_g_pp_therapy","text":"","code":"library(nestcolor) library(dplyr) data <- teal_data() data <- within(data, { ADCM <- tmc_ex_adcm ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADCM$USUBJID) ADCM$CMASTDTM <- ADCM$ASTDTM ADCM$CMAENDTM <- ADCM$AENDTM }) join_keys(data) <- default_cdisc_join_keys[c(\"ADSL\", \"ADCM\")] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys ADSL <- data[[\"ADSL\"]] ADCM <- data[[\"ADCM\"]] app <- init( data = data, modules = modules( tm_g_pp_therapy( label = \"Therapy\", dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", plot_height = c(600L, 200L, 2000L), atirel = choices_selected( choices = variable_choices(ADCM, \"ATIREL\"), selected = c(\"ATIREL\") ), cmdecod = choices_selected( choices = variable_choices(ADCM, \"CMDECOD\"), selected = \"CMDECOD\" ), cmindc = choices_selected( choices = variable_choices(ADCM, \"CMINDC\"), selected = \"CMINDC\" ), cmdose = choices_selected( choices = variable_choices(ADCM, \"CMDOSE\"), selected = \"CMDOSE\" ), cmtrt = choices_selected( choices = variable_choices(ADCM, \"CMTRT\"), selected = \"CMTRT\" ), cmdosu = choices_selected( choices = variable_choices(ADCM, \"CMDOSU\"), selected = c(\"CMDOSU\") ), cmroute = choices_selected( choices = variable_choices(ADCM, \"CMROUTE\"), selected = \"CMROUTE\" ), cmdosfrq = choices_selected( choices = variable_choices(ADCM, \"CMDOSFRQ\"), selected = \"CMDOSFRQ\" ), cmstdy = choices_selected( choices = variable_choices(ADCM, \"ASTDY\"), selected = \"ASTDY\" ), cmendy = choices_selected( choices = variable_choices(ADCM, \"AENDY\"), selected = \"AENDY\" ) ) ) ) #> Initializing tm_g_pp_therapy #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"module produces patient profile vitals ggplot2::ggplot() type plot using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"","code":"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(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval Please use aval_var argument instead. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. xaxis (teal.transform::choices_selected()) object available choices preselected option time variable dataname put plot x-axis. font_size (numeric) numeric vector length 3 current, minimum maximum font size values. plot_height (numeric) optional vector length three c(value, min, max). Specifies height main plot renders slider plot interactively adjust plot height. plot_width (numeric) optional vector length three c(value, min, max). Specifies width main plot renders slider plot interactively adjust plot width. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. ggplot2_args (ggplot2_args) optional object created teal.widgets::ggplot2_args() settings module plot. argument merged option teal.ggplot2_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-ggplot2-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"plot supports horizontal lines following 6 PARAMCD levels present dataname: \"SYSBP\", \"DIABP\", \"TEMP\", \"RESP\", \"OXYSAT\".","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"module generates following objects, can modified place using decorators: plot (ggplot2) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_g_pp_vitals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Vitals Plot — tm_g_pp_vitals","text":"","code":"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\" ) ) ) ) #> Initializing tm_g_pp_vitals #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Abnormality Summary Table — tm_t_abnormality","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"module produces table summarize abnormality.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"","code":"tm_t_abnormality( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, by_vars, grade, abnormal = list(low = c(\"LOW\", \"LOW LOW\"), high = c(\"HIGH\", \"HIGH HIGH\")), id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), baseline_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"BNRIND\"), selected = \"BNRIND\", fixed = TRUE), treatment_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"ONTRTFL\"), selected = \"ONTRTFL\", fixed = TRUE), treatment_flag = teal.transform::choices_selected(\"Y\"), add_total = TRUE, total_label = default_total_label(), exclude_base_abn = FALSE, drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, na_level = default_na_str(), basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. by_vars (teal.transform::choices_selected()) object available choices preselected option variable names used split summary rows. grade (teal.transform::choices_selected()) object available choices preselected option variable names can used specify abnormality grade. Variable must factor. abnormal (named list) defined user indicate abnormalities displayed. id_var (teal.transform::choices_selected()) object specifying variable name subject id. baseline_var (teal.transform::choices_selected()) variable baseline abnormality grade. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). exclude_base_abn (logical) whether exclude patients abnormal values baseline. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. na_level (character) NA level input dataset, default \"\". basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"Patients abnormality baseline treatment visit can excluded accordance GDSR specifications using exclude_base_abn.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Abnormality Summary Table — tm_t_abnormality","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb %>% mutate( ONTRTFL = case_when( AVISIT %in% c(\"SCREENING\", \"BASELINE\") ~ \"\", TRUE ~ \"Y\" ) %>% with_label(\"On Treatment Record Flag\") ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_abnormality( label = \"Abnormality Table\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), add_total = FALSE, by_vars = choices_selected( choices = variable_choices(ADLB, subset = c(\"LBCAT\", \"PARAM\", \"AVISIT\")), selected = c(\"LBCAT\", \"PARAM\"), keep_order = TRUE ), baseline_var = choices_selected( variable_choices(ADLB, subset = \"BNRIND\"), selected = \"BNRIND\", fixed = TRUE ), grade = choices_selected( choices = variable_choices(ADLB, subset = \"ANRIND\"), selected = \"ANRIND\", fixed = TRUE ), abnormal = list(low = \"LOW\", high = \"HIGH\"), exclude_base_abn = FALSE ) ) ) #> Initializing tm_t_abnormality #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality_by_worst_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"module produces table summarize laboratory test results highest grade post-baseline","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality_by_worst_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"","code":"tm_t_abnormality_by_worst_grade( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), paramcd, atoxgr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"ATOXGR\"), selected = \"ATOXGR\", fixed = TRUE), worst_high_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"WGRHIFL\"), selected = \"WGRHIFL\", fixed = TRUE), worst_low_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"WGRLOFL\"), selected = \"WGRLOFL\", fixed = TRUE), worst_flag_indicator = teal.transform::choices_selected(\"Y\"), add_total = TRUE, total_label = default_total_label(), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality_by_worst_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. id_var (teal.transform::choices_selected()) object specifying variable name subject id. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. atoxgr_var (teal.transform::choices_selected()) object available choices preselected option variable names can used Analysis Toxicity Grade. worst_high_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used Worst High Grade flag. worst_low_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used Worst Low Grade flag. worst_flag_indicator (teal.transform::choices_selected()) value indicating worst grade. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality_by_worst_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality_by_worst_grade.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality_by_worst_grade.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_abnormality_by_worst_grade.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Laboratory test results with highest grade post-baseline — tm_t_abnormality_by_worst_grade","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb %>% filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\")) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_abnormality_by_worst_grade( label = \"Laboratory Test Results with Highest Grade Post-Baseline\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( choices = value_choices(ADLB, \"PARAMCD\", \"PARAM\"), selected = c(\"ALT\", \"CRP\", \"IGA\") ), add_total = FALSE ) ), filter = teal_slices( teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"), teal_slice(\"ADLB\", \"ONTRTFL\", selected = \"Y\") ) ) #> Initializing tm_t_abnormality_by_worst_grade #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: ANCOVA Summary — tm_t_ancova","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"module produces table summarize analysis variance, consistent TLG Catalog template AOVT01 available multiple endpoints selected.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"","code":"tm_t_ancova( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, aval_var, cov_var, include_interact = FALSE, interact_var = NULL, interact_y = FALSE, avisit, paramcd, conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. include_interact (logical) whether interaction term included model. interact_var (character) name variable interactions arm. interaction needed, default option NULL. interact_y (character) selected item interact_var column used select specific ANCOVA results interact_var discrete. interaction needed, default option FALSE. avisit (teal.transform::choices_selected()) value analysis visit AVISIT interest. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"single endpoint selected, unadjusted adjusted comparison provided. modules expects analysis data following variables: AVISIT: variable used filter analysis visits. PARAMCD: variable used filter endpoints, filtering paramcd avisit, one observation per patient expected analysis meaningful.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_ancova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: ANCOVA Summary — tm_t_ancova","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADQS <- tmc_ex_adqs }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADQS <- data[[\"ADQS\"]] arm_ref_comp <- list( ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ), ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ) ) app <- init( data = data, modules = modules( tm_t_ancova( label = \"ANCOVA Table\", dataname = \"ADQS\", avisit = choices_selected( choices = value_choices(ADQS, \"AVISIT\"), selected = \"WEEK 1 DAY 8\" ), arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ACTARMCD\", \"ARMCD\")), selected = \"ARMCD\" ), arm_ref_comp = arm_ref_comp, aval_var = choices_selected( choices = variable_choices(ADQS, c(\"CHG\", \"AVAL\")), selected = \"CHG\" ), cov_var = choices_selected( choices = variable_choices(ADQS, c(\"BASE\", \"STRATA1\", \"SEX\")), selected = \"STRATA1\" ), paramcd = choices_selected( choices = value_choices(ADQS, \"PARAMCD\", \"PARAM\"), selected = \"FKSI-FWB\" ), interact_var = choices_selected( choices = variable_choices(ADQS, c(\"BASE\", \"STRATA1\", \"SEX\")), selected = \"STRATA1\" ) ) ) ) #> Initializing tm_t_ancova #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Binary Outcome Table — tm_t_binary_outcome","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"module produces binary outcome response summary table, option match template response table RSPT01 available TLG Catalog .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"","code":"tm_t_binary_outcome( label, dataname, parentname = ifelse(test = inherits(arm_var, \"data_extract_spec\"), yes = teal.transform::datanames_input(arm_var), no = \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, strata_var, aval_var = teal.transform::choices_selected(choices = teal.transform::variable_choices(dataname, c(\"AVALC\", \"SEX\")), selected = \"AVALC\", fixed = FALSE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), default_responses = c(\"CR\", \"PR\", \"Y\", \"Complete Response (CR)\", \"Partial Response (PR)\", \"M\"), rsp_table = FALSE, control = list(global = list(method = ifelse(rsp_table, \"clopper-pearson\", \"waldcc\"), conf_level = 0.95), unstrat = list(method_ci = ifelse(rsp_table, \"wald\", \"waldcc\"), method_test = \"schouten\", odds = TRUE), strat = list(method_ci = \"cmh\", method_test = \"cmh\")), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). default_responses (list character) defines default codes response variable module per value paramcd. passed vector transmitted paramcd values. passed list must named contain arrays, name corresponding single value paramcd. array may contain default response values named arrays rsp default selected response values levels default level choices. rsp_table (logical) whether initial set-module match RSPT01. Defaults FALSE. control (named list) named list containing 3 named lists follows: global: list settings overall analysis 2 named elements method conf_level. unstrat: list settings unstratified analysis 3 named elements method_ci method_test, odds. See tern::estimate_proportion_diff(), tern::test_proportion_diff(), tern::estimate_odds_ratio(), respectively, options details settings implemented analysis. strat: list settings stratified analysis elements method_ci method_test. See tern::estimate_proportion_diff() tern::test_proportion_diff(), respectively, options details settings implemented analysis. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"display order response categories inherits factor level order source data. Use base::factor() levels argument manipulate source data order include/exclude re-categorize response categories arrange display order. response categories \"Missing\", \"Evaluable (NE)\", \"Missing unevaluable\", 95% confidence interval calculated. Reference arms automatically combined multiple arms selected reference group.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_binary_outcome.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Binary Outcome Table — tm_t_binary_outcome","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADRS <- tmc_ex_adrs %>% mutate( AVALC = d_onco_rsp_label(AVALC) %>% with_label(\"Character Result/Finding\") ) %>% filter(PARAMCD != \"OVRINV\" | AVISIT == \"FOLLOW UP\") }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADRS <- data[[\"ADRS\"]] arm_ref_comp <- list( ARMCD = list(ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\")), ARM = list(ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\")) ) app <- init( data = data, modules = modules( tm_t_binary_outcome( label = \"Responders\", dataname = \"ADRS\", paramcd = choices_selected( choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"), selected = \"BESRSPI\" ), arm_var = choices_selected( choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), selected = \"ARM\" ), arm_ref_comp = arm_ref_comp, strata_var = choices_selected( choices = variable_choices(ADRS, c(\"SEX\", \"BMRKR2\", \"RACE\")), selected = \"RACE\" ), default_responses = list( BESRSPI = list( rsp = c(\"Complete Response (CR)\", \"Partial Response (PR)\"), levels = c( \"Complete Response (CR)\", \"Partial Response (PR)\", \"Stable Disease (SD)\", \"Progressive Disease (PD)\" ) ), INVET = list( rsp = c(\"Stable Disease (SD)\", \"Not Evaluable (NE)\"), levels = c( \"Complete Response (CR)\", \"Not Evaluable (NE)\", \"Partial Response (PR)\", \"Progressive Disease (PD)\", \"Stable Disease (SD)\" ) ), OVRINV = list( rsp = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\"), levels = c(\"Progressive Disease (PD)\", \"Stable Disease (SD)\", \"Not Evaluable (NE)\") ) ) ) ) ) #> Initializing tm_t_binary_outcome #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Cox Regression Model — tm_t_coxreg","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"module fits Cox univariable multi-variable models, consistent TLG Catalog templates Cox regression tables COXT01 COXT02, respectively. See TLG Catalog entries COXT01 COXT02 .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"","code":"tm_t_coxreg( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, cov_var, strata_var, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), multivariate = TRUE, na_level = default_na_str(), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. multivariate (logical) FALSE, univariable approach used instead multi-variable model. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"Cox Proportional Hazards (PH) model commonly used method estimate magnitude effect survival analysis. assumes proportional hazards: ratio hazards groups (e.g., two arms) constant time. ratio referred \"hazard ratio\" (HR) one commonly reported metrics describe effect size survival analysis. modules expects analysis data following variables: AVAL: time event CNSR: 1 record AVAL censored, 0 otherwise PARAMCD: variable used filter endpoint (e.g. OS). filtering PARAMCD one observation per patient expected arm variables stratification/covariate variables taken ADSL data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"likelihood ratio test supported models include strata - Wald test substituted cases. Multi-variable default choice backward compatibility.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"example-1 Open Shinylive example-2 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_coxreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Cox Regression Model — tm_t_coxreg","text":"","code":"## First example ## ============= ## The example below is based on the usual approach involving creation of ## a random CDISC dataset and then running the application. arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] app <- init( data = data, modules = modules( tm_t_coxreg( label = \"Cox Reg.\", dataname = \"ADTTE\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"ACTARMCD\"), \"ARM\"), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), strata_var = choices_selected( c(\"COUNTRY\", \"STRATA1\", \"STRATA2\"), \"STRATA1\" ), cov_var = choices_selected( c(\"AGE\", \"BMRKR1\", \"BMRKR2\", \"REGION1\"), \"AGE\" ), multivariate = TRUE ) ) ) #> Initializing tm_t_coxreg #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) } ## Second example ## ============== ## This time, a synthetic pair of ADTTE/ADSL data is fabricated for Cox regression ## where ties and pval_method matter. library(dplyr) data <- teal_data() data <- within(data, { ADTTE <- data.frame( STUDYID = \"LUNG\", AVAL = c(4, 3, 1, 1, 2, 2, 3, 1, 2), CNSR = c(1, 1, 1, 0, 1, 1, 0, 0, 0), ARMCD = factor( c(0, 1, 1, 1, 1, 0, 0, 0, 0), labels = c(\"ARM A\", \"ARM B\") ), SEX = factor( c(0, 0, 0, 0, 1, 1, 1, 1, 1), labels = c(\"F\", \"M\") ), INST = factor(c(\"A\", \"A\", \"B\", \"B\", \"A\", \"B\", \"A\", \"B\", \"A\")), stringsAsFactors = FALSE ) ADTTE <- rbind(ADTTE, ADTTE, ADTTE, ADTTE) ADTTE <- as_tibble(ADTTE) set.seed(1) ADTTE$INST <- sample(ADTTE$INST) ADTTE$AGE <- sample(seq(5, 75, 5), size = nrow(ADTTE), replace = TRUE) ADTTE$USUBJID <- paste(\"sub\", 1:nrow(ADTTE), ADTTE$INST, sep = \"-\") ADTTE$PARAM <- ADTTE$PARAMCD <- \"OS\" ADSL <- subset( ADTTE, select = c(\"USUBJID\", \"STUDYID\", \"ARMCD\", \"SEX\", \"INST\", \"AGE\") ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] ## `teal` application ## ---------------- ## Note that the R code exported by `Show R Code` does not include the data ## pre-processing. You will need to create the dataset as above before ## running the exported R code. arm_ref_comp <- list(ARMCD = list(ref = \"ARM A\", comp = c(\"ARM B\"))) app <- init( data = data, modules = modules( tm_t_coxreg( label = \"Cox Reg.\", dataname = \"ADTTE\", arm_var = choices_selected(c(\"ARMCD\"), \"ARMCD\"), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), strata_var = choices_selected(c(\"INST\"), NULL), cov_var = choices_selected(c(\"SEX\", \"AGE\"), \"SEX\"), multivariate = TRUE ) ) ) #> Initializing tm_t_coxreg #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Events by Term — tm_t_events","title":"teal Module: Events by Term — tm_t_events","text":"module produces table events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Events by Term — tm_t_events","text":"","code":"tm_t_events( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, hlt, llt, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", sort_criteria = c(\"freq_desc\", \"alpha\"), sort_freq_col = total_label, prune_freq = 0, prune_diff = 0, drop_arm_levels = TRUE, incl_overall_sum = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Events by Term — tm_t_events","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. hlt (teal.transform::choices_selected()) name variable high level term events. llt (teal.transform::choices_selected()) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. sort_freq_col (character) column sort frequency sort_criteria set freq_desc. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. incl_overall_sum (flag) whether two rows summarize overall number adverse events included top table. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Events by Term — tm_t_events","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Events by Term — tm_t_events","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Events by Term — tm_t_events","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Events by Term — tm_t_events","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_t_events( label = \"Adverse Event Table\", dataname = \"ADAE\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), llt = choices_selected( choices = variable_choices(ADAE, c(\"AETERM\", \"AEDECOD\")), selected = c(\"AEDECOD\") ), hlt = choices_selected( choices = variable_choices(ADAE, c(\"AEBODSYS\", \"AESOC\")), selected = \"AEBODSYS\" ), add_total = TRUE, event_type = \"adverse event\" ) ) ) #> Initializing tm_t_events #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Events by Grade — tm_t_events_by_grade","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"module produces table summarize events grade.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"","code":"tm_t_events_by_grade( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, hlt, llt, grade, grading_groups = list(`Any Grade (%)` = c(\"1\", \"2\", \"3\", \"4\", \"5\"), `Grade 1-2 (%)` = c(\"1\", \"2\"), `Grade 3-4 (%)` = c(\"3\", \"4\"), `Grade 5 (%)` = \"5\"), col_by_grade = FALSE, prune_freq = 0, prune_diff = 0, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. hlt (teal.transform::choices_selected()) name variable high level term events. llt (teal.transform::choices_selected()) name variable low level term events. grade (character) name severity level variable. grading_groups (list) named list grading groups used col_by_grade = TRUE. col_by_grade (logical) whether display grading groups nested columns. prune_freq (number) threshold use trimming table using event incidence rate column. prune_diff (number) threshold use trimming table using criteria difference rates two columns. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_by_grade.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_by_grade.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_by_grade.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Events by Grade — tm_t_events_by_grade","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl .lbls_adae <- col_labels(tmc_ex_adae) ADAE <- tmc_ex_adae %>% mutate_if(is.character, as.factor) #' be certain of having factors col_labels(ADAE) <- .lbls_adae }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAE <- data[[\"ADAE\"]] app <- init( data = data, modules = modules( tm_t_events_by_grade( label = \"Adverse Events by Grade Table\", dataname = \"ADAE\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), llt = choices_selected( choices = variable_choices(ADAE, c(\"AETERM\", \"AEDECOD\")), selected = c(\"AEDECOD\") ), hlt = choices_selected( choices = variable_choices(ADAE, c(\"AEBODSYS\", \"AESOC\")), selected = \"AEBODSYS\" ), grade = choices_selected( choices = variable_choices(ADAE, c(\"AETOXGR\", \"AESEV\")), selected = \"AETOXGR\" ) ) ) ) #> Initializing tm_t_events_by_grade #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_patyear.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"module produces table event rates adjusted patient-years.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_patyear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"","code":"tm_t_events_patyear( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, events_var, paramcd, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), avalu_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_patyear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. events_var (teal.transform::choices_selected()) object available choices preselected option variable event counts. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_patyear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_patyear.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_patyear.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"example-1 Open Shinylive example-2 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_patyear.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Event Rates Adjusted for Patient-Years — tm_t_events_patyear","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADAETTE <- tmc_ex_adaette %>% filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>% mutate(is_event = CNSR == 0) %>% mutate(n_events = as.integer(is_event)) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADAETTE <- data[[\"ADAETTE\"]] # 1. Basic Example app <- init( data = data, modules = modules( tm_t_events_patyear( label = \"AE Rate Adjusted for Patient-Years At Risk Table\", dataname = \"ADAETTE\", arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), selected = \"ARMCD\" ), add_total = TRUE, events_var = choices_selected( choices = variable_choices(ADAETTE, \"n_events\"), selected = \"n_events\", fixed = TRUE ), paramcd = choices_selected( choices = value_choices(ADAETTE, \"PARAMCD\", \"PARAM\"), selected = \"AETTE1\" ) ) ) ) #> Initializing tm_t_events_patyear #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) } # 2. Example with table split on 2 arm_var variables app <- init( data = data, modules = modules( tm_t_events_patyear( label = \"AE Rate Adjusted for Patient-Years At Risk Table\", dataname = \"ADAETTE\", arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"SEX\")), selected = c(\"ARM\", \"SEX\") ), add_total = TRUE, events_var = choices_selected( choices = variable_choices(ADAETTE, \"n_events\"), selected = \"n_events\", fixed = TRUE ), paramcd = choices_selected( choices = value_choices(ADAETTE, \"PARAMCD\", \"PARAM\"), selected = \"AETTE1\" ) ) ) ) #> Initializing tm_t_events_patyear #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Adverse Events Summary — tm_t_events_summary","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"module produces adverse events summary table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"","code":"tm_t_events_summary( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, flag_var_anl = NULL, flag_var_aesi = NULL, dthfl_var = teal.transform::choices_selected(teal.transform::variable_choices(parentname, \"DTHFL\"), \"DTHFL\", fixed = TRUE), dcsreas_var = teal.transform::choices_selected(teal.transform::variable_choices(parentname, \"DCSREAS\"), \"DCSREAS\", fixed = TRUE), llt = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AEDECOD\"), \"AEDECOD\", fixed = TRUE), aeseq_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AESEQ\"), \"AESEQ\", fixed = TRUE), add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), count_dth = TRUE, count_wd = TRUE, count_subj = TRUE, count_pt = TRUE, count_events = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. flag_var_anl (teal.transform::choices_selected() NULL) vector names flag variables dataset used count adverse event sub-groups (e.g. Serious events, Related events, etc.). Variable labels used table row names exist. flag_var_aesi (teal.transform::choices_selected() NULL) vector names flag variables dataset used count adverse event special interest groups. flag variables must type logical. Variable labels used table row names exist. dthfl_var (teal.transform::choices_selected()) object available choices preselected option variable names can used death flag variable. Records `\"Y\"“ summarized table row \"Total number deaths\". dcsreas_var (teal.transform::choices_selected()) object available choices preselected option variable names can used study discontinuation reason variable. Records \"ADVERSE EVENTS\" summarized table row \"Total number patients withdrawn study due AE\". llt (teal.transform::choices_selected()) name variable low level term events. aeseq_var (teal.transform::choices_selected()) variable adverse events sequence number dataset. Used counting total number events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). count_dth (logical) whether show count total deaths (based dthfl_var). Defaults TRUE. count_wd (logical) whether show count patients withdrawn study due adverse event (based dcsreas_var). Defaults TRUE. count_subj (logical) whether show count unique subjects (based USUBJID). applies event flag variables provided. count_pt (logical) whether show count unique preferred terms (based llt). applies event flag variables provided. count_events (logical) whether show count events (based aeseq_var). applies event flag variables provided. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_summary.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_summary.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_events_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Adverse Events Summary — tm_t_events_summary","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl %>% mutate( DTHFL = case_when( !is.na(DTHDT) ~ \"Y\", TRUE ~ \"\" ) %>% with_label(\"Subject Death Flag\") ) ADAE <- tmc_ex_adae .add_event_flags <- function(dat) { dat <- dat %>% mutate( TMPFL_SER = AESER == \"Y\", TMPFL_REL = AEREL == \"Y\", TMPFL_GR5 = AETOXGR == \"5\", TMP_SMQ01 = !is.na(SMQ01NAM), TMP_SMQ02 = !is.na(SMQ02NAM), TMP_CQ01 = !is.na(CQ01NAM) ) column_labels <- list( TMPFL_SER = \"Serious AE\", TMPFL_REL = \"Related AE\", TMPFL_GR5 = \"Grade 5 AE\", TMP_SMQ01 = aesi_label(dat[[\"SMQ01NAM\"]], dat[[\"SMQ01SC\"]]), TMP_SMQ02 = aesi_label(\"Y.9.9.9.9/Z.9.9.9.9 AESI\"), TMP_CQ01 = aesi_label(dat[[\"CQ01NAM\"]]) ) col_labels(dat)[names(column_labels)] <- as.character(column_labels) dat } #' Generating user-defined event flags. ADAE <- ADAE %>% .add_event_flags() .ae_anl_vars <- names(ADAE)[startsWith(names(ADAE), \"TMPFL_\")] .aesi_vars <- names(ADAE)[startsWith(names(ADAE), \"TMP_\")] }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_t_events_summary( label = \"Adverse Events Summary\", dataname = \"ADAE\", arm_var = choices_selected( choices = variable_choices(\"ADSL\", c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), flag_var_anl = choices_selected( choices = variable_choices(\"ADAE\", data[[\".ae_anl_vars\"]]), selected = data[[\".ae_anl_vars\"]][1], keep_order = TRUE, fixed = FALSE ), flag_var_aesi = choices_selected( choices = variable_choices(\"ADAE\", data[[\".aesi_vars\"]]), selected = data[[\".aesi_vars\"]][1], keep_order = TRUE, fixed = FALSE ), add_total = TRUE ) ) ) #> Initializing tm_t_events_summary #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_exposure.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"module produces exposure table risk management plan.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_exposure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"","code":"tm_t_exposure( label, dataname, parentname = ifelse(inherits(col_by_var, \"data_extract_spec\"), teal.transform::datanames_input(col_by_var), \"ADSL\"), row_by_var, col_by_var, paramcd = teal.transform::choices_selected(choices = teal.transform::value_choices(dataname, \"PARAMCD\", \"PARAM\"), selected = \"TDURD\"), paramcd_label = \"PARAM\", id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), parcat, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"AVAL\"), selected = \"AVAL\", fixed = TRUE), avalu_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"AVALU\"), selected = \"AVALU\", fixed = TRUE), add_total, total_label = default_total_label(), add_total_row = TRUE, total_row_label = \"Total number of patients and patient time*\", na_level = default_na_str(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_exposure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. row_by_var (teal.transform::choices_selected()) object available choices preselected option variable names can used split rows. col_by_var (teal.transform::choices_selected()) object available choices preselected option variable names can used split columns. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. paramcd_label (character) column dataset value used label argument paramcd. id_var (teal.transform::choices_selected()) object specifying variable name subject id. parcat (teal.transform::choices_selected()) object available choices preselected option parameter category values. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). add_total_row (flag) whether \"total\" level added others includes levels constitute split. custom label can set level via total_row_label argument. total_row_label (character) string display total row label row enabled (see add_total_row). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_exposure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_exposure.html","id":"decorating-modules","dir":"Reference","previous_headings":"","what":"Decorating Modules","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"module generates following objects, can modified place using decorators: table (TableTree created rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_exposure.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_exposure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Exposure Table for Risk management plan — tm_t_exposure","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADEX <- tmc_ex_adex set.seed(1, kind = \"Mersenne-Twister\") .labels <- col_labels(ADEX, fill = FALSE) ADEX <- ADEX %>% distinct(USUBJID, .keep_all = TRUE) %>% mutate( PARAMCD = \"TDURD\", PARAM = \"Overall duration (days)\", AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE), AVALU = \"Days\" ) %>% bind_rows(ADEX) col_labels(ADEX) <- .labels }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_t_exposure( label = \"Duration of Exposure Table\", dataname = \"ADEX\", paramcd = choices_selected( choices = value_choices(data[[\"ADEX\"]], \"PARAMCD\", \"PARAM\"), selected = \"TDURD\" ), col_by_var = choices_selected( choices = variable_choices(data[[\"ADEX\"]], subset = c(\"SEX\", \"ARM\")), selected = \"SEX\" ), row_by_var = choices_selected( choices = variable_choices(data[[\"ADEX\"]], subset = c(\"RACE\", \"REGION1\", \"STRATA1\", \"SEX\")), selected = \"RACE\" ), parcat = choices_selected( choices = value_choices(data[[\"ADEX\"]], \"PARCAT2\"), selected = \"Drug A\" ), add_total = FALSE ) ), filter = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\")) ) #> Initializing tm_t_exposure #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Logistic Regression — tm_t_logistic","title":"teal Module: Logistic Regression — tm_t_logistic","text":"module produces multi-variable logistic regression table consistent TLG Catalog template LGRT02 available .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Logistic Regression — tm_t_logistic","text":"","code":"tm_t_logistic( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var = NULL, arm_ref_comp = NULL, paramcd, cov_var = NULL, avalc_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALC\"), \"AVALC\", fixed = TRUE), conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Logistic Regression — tm_t_logistic","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected() NULL) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. NULL, arm/treatment variable included logistic model. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. cov_var (teal.transform::choices_selected()) object available choices preselected option covariates variables. avalc_var (teal.transform::choices_selected()) object available choices preselected option analysis variable (categorical). conf_level (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Logistic Regression — tm_t_logistic","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_logistic.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Logistic Regression — tm_t_logistic","text":"module generates following objects, can modified place using decorators: table (ElementaryTable - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_logistic.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Logistic Regression — tm_t_logistic","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_logistic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Logistic Regression — tm_t_logistic","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADRS <- tmc_ex_adrs %>% filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\")) }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADRS <- data[[\"ADRS\"]] arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) app <- init( data = data, modules = modules( tm_t_logistic( label = \"Logistic Regression\", dataname = \"ADRS\", arm_var = choices_selected( choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"), selected = \"BESRSPI\" ), cov_var = choices_selected( choices = c(\"SEX\", \"AGE\", \"BMRKR1\", \"BMRKR2\"), selected = \"SEX\" ) ) ) ) #> Initializing tm_t_logistic #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_mult_events.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Multiple Events by Term — tm_t_mult_events","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"module produces table multiple events term.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_mult_events.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"","code":"tm_t_mult_events( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, seq_var, hlt, llt, add_total = TRUE, total_label = default_total_label(), na_level = default_na_str(), event_type = \"event\", drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_mult_events.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. seq_var (teal.transform::choices_selected()) object available choices preselected option variable names can used analysis sequence number variable. Used counting unique number events. hlt (teal.transform::choices_selected()) name variable high level term events. llt (teal.transform::choices_selected()) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). event_type (character) type event summarized (e.g. adverse event, treatment). Default \"event\". drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_mult_events.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_mult_events.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_mult_events.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_mult_events.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Multiple Events by Term — tm_t_mult_events","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADCM <- tmc_ex_adcm }) join_keys(data) <- default_cdisc_join_keys[names(data)] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys ADSL <- data[[\"ADSL\"]] ADCM <- data[[\"ADCM\"]] app <- init( data = data, modules = modules( tm_t_mult_events( label = \"Concomitant Medications by Medication Class and Preferred Name\", dataname = \"ADCM\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE), hlt = choices_selected( choices = variable_choices(ADCM, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")), selected = c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") ), llt = choices_selected( choices = variable_choices(ADCM, c(\"CMDECOD\")), selected = c(\"CMDECOD\") ), add_total = TRUE, event_type = \"treatment\" ) ) ) #> Initializing tm_t_mult_events #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_basic_info.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"module produces patient profile basic info report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_basic_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"","code":"tm_t_pp_basic_info( label, dataname = \"ADSL\", patient_col = \"USUBJID\", vars = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_basic_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. patient_col (character) name patient ID variable. vars (teal.transform::choices_selected()) object available choices preselected option variables dataname show table. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_basic_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_basic_info.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"module generates following objects, can modified place using decorators: table (listing_df - output rlistings::as_listing) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_basic_info.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_basic_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Basic Info — tm_t_pp_basic_info","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] app <- init( data = data, modules = modules( tm_t_pp_basic_info( label = \"Basic Info\", dataname = \"ADSL\", patient_col = \"USUBJID\", vars = choices_selected( choices = variable_choices(ADSL), selected = c(\"ARM\", \"AGE\", \"SEX\", \"COUNTRY\", \"RACE\", \"EOSSTT\") ) ) ) ) #> Initializing tm_t_pp_basic_info #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_laboratory.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"module produces patient profile laboratory table using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_laboratory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"","code":"tm_t_pp_laboratory( label, dataname = \"ADLB\", parentname = \"ADSL\", patient_col = \"USUBJID\", timepoints = NULL, aval = lifecycle::deprecated(), aval_var = NULL, avalu = lifecycle::deprecated(), avalu_var = NULL, param = NULL, paramcd = NULL, anrind = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_laboratory.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. timepoints (teal.transform::choices_selected()) object available choices preselected option time variable dataname. aval Please use aval_var argument instead. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. avalu Please use avalu_var argument instead. avalu_var (teal.transform::choices_selected()) object available choices preselected option analysis unit variable. param (teal.transform::choices_selected()) object available choices preselected option PARAM variable dataname. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. anrind (teal.transform::choices_selected()) object available choices preselected option ANRIND variable dataname. Variable following 3 levels: \"HIGH\", \"LOW\", \"NORMAL\". pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_laboratory.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_laboratory.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"module generates following objects, can modified place using decorators: table (listing_df - output rlistings::as_listing) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_laboratory.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_laboratory.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Laboratory Table — tm_t_pp_laboratory","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_pp_laboratory( label = \"Vitals\", dataname = \"ADLB\", patient_col = \"USUBJID\", paramcd = choices_selected( choices = variable_choices(ADLB, \"PARAMCD\"), selected = \"PARAMCD\" ), param = choices_selected( choices = variable_choices(ADLB, \"PARAM\"), selected = \"PARAM\" ), timepoints = choices_selected( choices = variable_choices(ADLB, \"ADY\"), selected = \"ADY\" ), anrind = choices_selected( choices = variable_choices(ADLB, \"ANRIND\"), selected = \"ANRIND\" ), aval_var = choices_selected( choices = variable_choices(ADLB, \"AVAL\"), selected = \"AVAL\" ), avalu_var = choices_selected( choices = variable_choices(ADLB, \"AVALU\"), selected = \"AVALU\" ) ) ) ) #> Initializing tm_t_pp_laboratory #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_medical_history.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"module produces patient profile medical history report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_medical_history.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"","code":"tm_t_pp_medical_history( label, dataname = \"ADMH\", parentname = \"ADSL\", patient_col = \"USUBJID\", mhterm = NULL, mhbodsys = NULL, mhdistat = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_medical_history.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. mhterm (teal.transform::choices_selected()) object available choices preselected option MHTERM variable dataname. mhbodsys (teal.transform::choices_selected()) object available choices preselected option MHBODSYS variable dataname. mhdistat (teal.transform::choices_selected()) object available choices preselected option MHDISTAT variable dataname. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_medical_history.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_medical_history.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_medical_history.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_medical_history.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Medical History — tm_t_pp_medical_history","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADMH <- tmc_ex_admh }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADMH <- data[[\"ADMH\"]] app <- init( data = data, modules = modules( tm_t_pp_medical_history( label = \"Medical History\", dataname = \"ADMH\", parentname = \"ADSL\", patient_col = \"USUBJID\", mhterm = choices_selected( choices = variable_choices(ADMH, c(\"MHTERM\")), selected = \"MHTERM\" ), mhbodsys = choices_selected( choices = variable_choices(ADMH, \"MHBODSYS\"), selected = \"MHBODSYS\" ), mhdistat = choices_selected( choices = variable_choices(ADMH, \"MHDISTAT\"), selected = \"MHDISTAT\" ) ) ) ) #> Initializing tm_t_pp_medical_history #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_prior_medication.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"module produces patient profile prior medication report using ADaM datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_prior_medication.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"","code":"tm_t_pp_prior_medication( label, dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", atirel = NULL, cmdecod = NULL, cmindc = NULL, cmstdy = NULL, pre_output = NULL, post_output = NULL, decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_prior_medication.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. patient_col (character) name patient ID variable. atirel (teal.transform::choices_selected()) object available choices preselected option ATIREL variable dataname. cmdecod (teal.transform::choices_selected()) object available choices preselected option CMDECOD variable dataname. cmindc (teal.transform::choices_selected()) object available choices preselected option CMINDC variable dataname. cmstdy (teal.transform::choices_selected()) object available choices preselected option CMSTDY variable dataname. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_prior_medication.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_prior_medication.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"module generates following objects, can modified place using decorators: table (listing_df - output rlistings::as_listing) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_prior_medication.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_pp_prior_medication.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Patient Profile Prior Medication — tm_t_pp_prior_medication","text":"","code":"library(dplyr) data <- teal_data() data <- within(data, { ADCM <- tmc_ex_adcm ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADCM$USUBJID) ADCM$CMASTDTM <- ADCM$ASTDTM ADCM$CMAENDTM <- ADCM$AENDTM }) join_keys(data) <- default_cdisc_join_keys[names(data)] adcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\") join_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys ADSL <- data[[\"ADSL\"]] ADCM <- data[[\"ADCM\"]] app <- init( data = data, modules = modules( tm_t_pp_prior_medication( label = \"Prior Medication\", dataname = \"ADCM\", parentname = \"ADSL\", patient_col = \"USUBJID\", atirel = choices_selected( choices = variable_choices(ADCM, \"ATIREL\"), selected = \"ATIREL\" ), cmdecod = choices_selected( choices = variable_choices(ADCM, \"CMDECOD\"), selected = \"CMDECOD\" ), cmindc = choices_selected( choices = variable_choices(ADCM, \"CMINDC\"), selected = \"CMINDC\" ), cmstdy = choices_selected( choices = variable_choices(ADCM, \"ASTDY\"), selected = \"ASTDY\" ) ) ) ) #> Initializing tm_t_pp_prior_medication #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Shift by Arm — tm_t_shift_by_arm","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"module produces summary table analysis indicator levels arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"","code":"tm_t_shift_by_arm( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, paramcd, visit_var, aval_var, base_var = lifecycle::deprecated(), baseline_var, treatment_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"ONTRTFL\"), selected = \"ONTRTFL\"), treatment_flag = teal.transform::choices_selected(\"Y\"), useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. base_var Please use baseline_var argument instead. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Shift by Arm — tm_t_shift_by_arm","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADEG <- tmc_ex_adeg }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADEG <- data[[\"ADEG\"]] app <- init( data = data, modules = modules( tm_t_shift_by_arm( label = \"Shift by Arm Table\", dataname = \"ADEG\", arm_var = choices_selected( variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( value_choices(ADEG, \"PARAMCD\"), selected = \"HR\" ), visit_var = choices_selected( value_choices(ADEG, \"AVISIT\"), selected = \"POST-BASELINE MINIMUM\" ), aval_var = choices_selected( variable_choices(ADEG, subset = \"ANRIND\"), selected = \"ANRIND\", fixed = TRUE ), baseline_var = choices_selected( variable_choices(ADEG, subset = \"BNRIND\"), selected = \"BNRIND\", fixed = TRUE ), useNA = \"ifany\" ) ) ) #> Initializing tm_t_shift_by_arm #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm_by_worst.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"module produces summary table worst analysis indicator variable level per subject arm.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm_by_worst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"","code":"tm_t_shift_by_arm_by_worst( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, paramcd, aval_var, base_var = lifecycle::deprecated(), baseline_var, worst_flag_var, worst_flag, treatment_flag_var = teal.transform::choices_selected(choices = teal.transform::variable_choices(dataname, subset = \"ONTRTFL\"), selected = \"ONTRTFL\"), treatment_flag = teal.transform::choices_selected(\"Y\"), useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), add_total = FALSE, total_label = default_total_label(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm_by_worst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. base_var Please use baseline_var argument instead. baseline_var (teal.transform::choices_selected()) object available choices preselected option variable values can used baseline_var. worst_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used worst flag variable. worst_flag (character) value indicating worst analysis indicator level. treatment_flag_var (teal.transform::choices_selected()) treatment flag variable. treatment_flag (teal.transform::choices_selected()) value indicating treatment records treatment_flag_var. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). add_total (logical) whether include row total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm_by_worst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm_by_worst.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm_by_worst.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_arm_by_worst.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Shift by Arm by Worst Analysis Indicator Level — tm_t_shift_by_arm_by_worst","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADEG <- tmc_ex_adeg }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADEG <- data[[\"ADEG\"]] app <- init( data = data, modules = modules( tm_t_shift_by_arm_by_worst( label = \"Shift by Arm Table\", dataname = \"ADEG\", arm_var = choices_selected( variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( value_choices(ADEG, \"PARAMCD\"), selected = \"ECGINTP\" ), worst_flag_var = choices_selected( variable_choices(ADEG, c(\"WORS02FL\", \"WORS01FL\")), selected = \"WORS02FL\" ), worst_flag = choices_selected( value_choices(ADEG, \"WORS02FL\"), selected = \"Y\", fixed = TRUE ), aval_var = choices_selected( variable_choices(ADEG, c(\"AVALC\", \"ANRIND\")), selected = \"AVALC\" ), baseline_var = choices_selected( variable_choices(ADEG, c(\"BASEC\", \"BNRIND\")), selected = \"BASEC\" ), useNA = \"ifany\" ) ) ) #> Initializing tm_t_shift_by_arm_by_worst #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_grade.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Grade Summary Table — tm_t_shift_by_grade","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"module produces summary table worst grades per subject visit parameter.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_grade.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"","code":"tm_t_shift_by_grade( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, visit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"AVISIT\"), selected = \"AVISIT\", fixed = TRUE), paramcd, worst_flag_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")), selected = \"WGRLOVFL\"), worst_flag_indicator = teal.transform::choices_selected(teal.transform::value_choices(dataname, \"WGRLOVFL\"), selected = \"Y\", fixed = TRUE), anl_toxgrade_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = c(\"ATOXGR\")), selected = c(\"ATOXGR\"), fixed = TRUE), base_toxgrade_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = c(\"BTOXGR\")), selected = c(\"BTOXGR\"), fixed = TRUE), id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), add_total = FALSE, total_label = default_total_label(), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, na_level = default_na_str(), code_missing_baseline = FALSE, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_grade.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. visit_var (teal.transform::choices_selected()) object available choices preselected option variable names can used visit variable. Must factor dataname. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. worst_flag_var (teal.transform::choices_selected()) object available choices preselected option variable names can used worst flag variable. worst_flag_indicator (teal.transform::choices_selected()) value indicating worst grade. anl_toxgrade_var (teal.transform::choices_selected()) variable analysis toxicity grade. base_toxgrade_var (teal.transform::choices_selected()) variable baseline toxicity grade. id_var (teal.transform::choices_selected()) object specifying variable name subject id. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). code_missing_baseline (logical) whether missing baseline grades counted grade 0. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_grade.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_grade.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_grade.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_shift_by_grade.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Grade Summary Table — tm_t_shift_by_grade","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_shift_by_grade( label = \"Grade Laboratory Abnormality Table\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, subset = c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), paramcd = choices_selected( choices = value_choices(ADLB, \"PARAMCD\", \"PARAM\"), selected = \"ALT\" ), worst_flag_var = choices_selected( choices = variable_choices(ADLB, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")), selected = c(\"WGRLOVFL\") ), worst_flag_indicator = choices_selected( value_choices(ADLB, \"WGRLOVFL\"), selected = \"Y\", fixed = TRUE ), anl_toxgrade_var = choices_selected( choices = variable_choices(ADLB, subset = c(\"ATOXGR\")), selected = c(\"ATOXGR\"), fixed = TRUE ), base_toxgrade_var = choices_selected( choices = variable_choices(ADLB, subset = c(\"BTOXGR\")), selected = c(\"BTOXGR\"), fixed = TRUE ), add_total = FALSE ) ), filter = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\")) ) #> Initializing tm_t_shift_by_grade #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_smq.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"module produces adverse events table Standardized MedDRA Query.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_smq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"","code":"tm_t_smq( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), llt, add_total = TRUE, total_label = default_total_label(), sort_criteria = c(\"freq_desc\", \"alpha\"), drop_arm_levels = TRUE, na_level = default_na_str(), smq_varlabel = \"Standardized MedDRA Query\", baskets, scopes, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_smq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. id_var (teal.transform::choices_selected()) object specifying variable name subject id. llt (teal.transform::choices_selected()) name variable low level term events. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). sort_criteria (character) sort final table. Default option freq_desc sorts column sort_freq_col decreasing number patients event. Alternative option alpha sorts events alphabetically. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). smq_varlabel (character) label use new column SMQ created tern::h_stack_by_baskets(). baskets (teal.transform::choices_selected()) object available choices preselected options standardized/customized queries. scopes (teal.transform::choices_selected()) object available choices scopes standardized queries. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_smq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_smq.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_smq.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_smq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Adverse Events Table by Standardized MedDRA Query — tm_t_smq","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADAE <- tmc_ex_adae .names_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(ADAE), value = TRUE) .names_scopes <- grep(\"^SMQ.*SC$\", names(ADAE), value = TRUE) .cs_baskets <- choices_selected( choices = variable_choices(ADAE, subset = .names_baskets), selected = .names_baskets ) .cs_scopes <- choices_selected( choices = variable_choices(ADAE, subset = .names_scopes), selected = .names_scopes, fixed = TRUE ) }) join_keys(data) <- default_cdisc_join_keys[names(data)] app <- init( data = data, modules = modules( tm_t_smq( label = \"Adverse Events by SMQ Table\", dataname = \"ADAE\", arm_var = choices_selected( choices = variable_choices(data[[\"ADSL\"]], subset = c(\"ARM\", \"SEX\")), selected = \"ARM\" ), add_total = FALSE, baskets = data[[\".cs_baskets\"]], scopes = data[[\".cs_scopes\"]], llt = choices_selected( choices = variable_choices(data[[\"ADAE\"]], subset = c(\"AEDECOD\")), selected = \"AEDECOD\" ) ) ) ) #> Initializing tm_t_smq #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Summary of Variables — tm_t_summary","title":"teal Module: Summary of Variables — tm_t_summary","text":"module produces table summarize variables.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Summary of Variables — tm_t_summary","text":"","code":"tm_t_summary( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, summarize_vars, add_total = TRUE, total_label = default_total_label(), show_arm_var_labels = TRUE, useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"mean_ci\", \"median\", \"median_ci\", \"quantiles\", \"range\", \"geom_mean\"), denominator = c(\"N\", \"n\", \"omit\"), drop_arm_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Summary of Variables — tm_t_summary","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. summarize_vars (teal.transform::choices_selected()) names variables summarized. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). show_arm_var_labels (flag) whether arm variable label(s) displayed. Defaults TRUE. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Summary of Variables — tm_t_summary","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Summary of Variables — tm_t_summary","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Summary of Variables — tm_t_summary","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Summary of Variables — tm_t_summary","text":"","code":"# Preparation of the test case - use `EOSDY` and `DCSREAS` variables to demonstrate missing data. data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADSL$EOSDY[1] <- NA_integer_ }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] app <- init( data = data, modules = modules( tm_t_summary( label = \"Demographic Table\", dataname = \"ADSL\", arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"), add_total = TRUE, summarize_vars = choices_selected( c(\"SEX\", \"RACE\", \"BMRKR2\", \"EOSDY\", \"DCSREAS\", \"AGE\"), c(\"SEX\", \"RACE\") ), useNA = \"ifany\" ) ) ) #> Initializing tm_t_summary #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary_by.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"module produces table summarize variables row groups.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary_by.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"","code":"tm_t_summary_by( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, by_vars, summarize_vars, id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset = \"USUBJID\"), selected = \"USUBJID\", fixed = TRUE), paramcd = NULL, add_total = TRUE, total_label = default_total_label(), parallel_vars = FALSE, row_groups = FALSE, useNA = c(\"ifany\", \"no\"), na_level = default_na_str(), numeric_stats = c(\"n\", \"mean_sd\", \"median\", \"range\"), denominator = teal.transform::choices_selected(c(\"n\", \"N\", \"omit\"), \"omit\", fixed = TRUE), drop_arm_levels = TRUE, drop_zero_levels = TRUE, pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary_by.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable(s) results table. two elements selected arm_var, second variable nested first variable. by_vars (teal.transform::choices_selected()) object available choices preselected option variable names used split summary rows. summarize_vars (teal.transform::choices_selected()) names variables summarized. id_var (teal.transform::choices_selected()) object specifying variable name subject id. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). parallel_vars (logical) whether summarized variables arranged columns. Can set TRUE chosen analysis variables numeric. row_groups (logical) whether summarized variables arranged row groups. useNA (character) whether missing data (NA) displayed level. na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). numeric_stats (character) names statistics display numeric summary variables. Available statistics n, mean_sd, mean_ci, median, median_ci, quantiles, range, geom_mean. denominator (character) chooses percentages calculated. option N, reference population column total used denominator. option n, number non-missing records row column intersection used denominator. omit chosen, percentage omitted. drop_arm_levels (logical) whether drop unused levels arm_var. TRUE, arm_var levels set used dataname dataset. FALSE, arm_var levels set used parentname dataset. dataname parentname , drop_arm_levels set TRUE user input parameter ignored. drop_zero_levels (logical) whether rows zero counts columns removed table. pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary_by.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary_by.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary_by.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_summary_by.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Summarize Variables by Row Groups — tm_t_summary_by","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADLB <- tmc_ex_adlb }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADLB <- data[[\"ADLB\"]] app <- init( data = data, modules = modules( tm_t_summary_by( label = \"Summary by Row Groups Table\", dataname = \"ADLB\", arm_var = choices_selected( choices = variable_choices(ADSL, c(\"ARM\", \"ARMCD\")), selected = \"ARM\" ), add_total = TRUE, by_vars = choices_selected( choices = variable_choices(ADLB, c(\"PARAM\", \"AVISIT\")), selected = c(\"AVISIT\") ), summarize_vars = choices_selected( choices = variable_choices(ADLB, c(\"AVAL\", \"CHG\")), selected = c(\"AVAL\") ), useNA = \"ifany\", paramcd = choices_selected( choices = value_choices(ADLB, \"PARAMCD\", \"PARAM\"), selected = \"ALT\" ) ) ) ) #> Initializing tm_t_summary_by #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":null,"dir":"Reference","previous_headings":"","what":"teal Module: Time-To-Event Table — tm_t_tte","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"module produces time--event analysis summary table, consistent TLG Catalog template TTET01 available .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"","code":"tm_t_tte( label, dataname, parentname = ifelse(inherits(arm_var, \"data_extract_spec\"), teal.transform::datanames_input(arm_var), \"ADSL\"), arm_var, arm_ref_comp = NULL, paramcd, strata_var, aval_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVAL\"), \"AVAL\", fixed = TRUE), cnsr_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"CNSR\"), \"CNSR\", fixed = TRUE), conf_level_coxph = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), conf_level_survfit = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order = TRUE), time_points, time_unit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname, \"AVALU\"), \"AVALU\", fixed = TRUE), event_desc_var = teal.transform::choices_selected(\"EVNTDESC\", \"EVNTDESC\", fixed = TRUE), add_total = FALSE, total_label = default_total_label(), na_level = default_na_str(), pre_output = NULL, post_output = NULL, basic_table_args = teal.widgets::basic_table_args(), decorators = NULL )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"label (character) menu item label module teal app. dataname (character) analysis data used teal module. parentname (character) parent analysis data used teal module, usually refers ADSL. arm_var (teal.transform::choices_selected()) object available choices preselected option variable names can used arm_var. defines grouping variable results table. arm_ref_comp (list) optional, specified must named list element corresponding arm variable ADSL element must another list (possibly delayed teal.transform::variable_choices() delayed teal.transform::value_choices() elements named ref comp defined default reference comparison arms arm variable changed. paramcd (teal.transform::choices_selected()) object available choices preselected option parameter code variable dataname. strata_var (teal.transform::choices_selected()) names variables stratified analysis. aval_var (teal.transform::choices_selected()) object available choices pre-selected option analysis variable. cnsr_var (teal.transform::choices_selected()) object available choices preselected option censoring variable. conf_level_coxph (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). conf_level_survfit (teal.transform::choices_selected()) object available choices pre-selected option confidence level, within range (0, 1). time_points (teal.transform::choices_selected()) object available choices preselected option time points can used tern::surv_timepoint(). time_unit_var (teal.transform::choices_selected()) object available choices pre-selected option time unit variable. event_desc_var (character teal.transform::data_extract_spec()) variable name event description information, optional. add_total (logical) whether include column total number patients. total_label (string) string display total column/row label column/row enabled (see add_total). Defaults \"Patients\". set new default total_label apply modules, run set_default_total_label(\"new_default\"). na_level (string) used replace NA empty values character factor variables data. Defaults \"\". set default na_level apply modules, run set_default_na_str(\"new_default\"). pre_output (shiny.tag) optional, text placed output put output context. example title. post_output (shiny.tag) optional, text placed output put output context. example shiny::helpText() elements useful. basic_table_args (basic_table_args) optional object created teal.widgets::basic_table_args() settings module table. argument merged option teal.basic_table_args default module arguments (hard coded module body). details, see vignette: vignette(\"custom-basic-table-arguments\", package = \"teal.widgets\"). decorators \" (list teal_transform_module, named list teal_transform_module \" NULL) optional, NULL, decorator tables plots included module. named list teal_transform_module, decorators applied respective output objects. Otherwise, decorators applied objects, equivalent using name default. See section \"Decorating Module\" details.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"teal_module object.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"core functionality module based tern::coxph_pairwise(), tern::surv_timepoint(), tern::surv_time() tern package. arm stratification variables taken parentname data. following variables used module: AVAL: time event CNSR: 1 record AVAL censored, 0 otherwise PARAMCD: variable used filter endpoint (e.g. OS). filtering PARAMCD one observation per patient expected","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":"decorating-module","dir":"Reference","previous_headings":"","what":"Decorating Module","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"module generates following objects, can modified place using decorators: table (TableTree - output rtables::build_table) additional details examples decorators, refer vignette vignette(\"decorate-modules-output\", package = \"teal\") teal_transform_module() documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":"examples-in-shinylive","dir":"Reference","previous_headings":"","what":"Examples in Shinylive","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"example-1 Open Shinylive","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/tm_t_tte.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"teal Module: Time-To-Event Table — tm_t_tte","text":"","code":"data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl ADTTE <- tmc_ex_adtte }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[[\"ADSL\"]] ADTTE <- data[[\"ADTTE\"]] arm_ref_comp <- list( ACTARMCD = list( ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\") ), ARM = list( ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\") ) ) app <- init( data = data, modules = modules( tm_t_tte( label = \"Time To Event Table\", dataname = \"ADTTE\", arm_var = choices_selected( variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")), \"ARM\" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\" ), strata_var = choices_selected( variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")), \"SEX\" ), time_points = choices_selected(c(182, 243), 182), event_desc_var = choices_selected( variable_choices(ADTTE, \"EVNTDESC\"), \"EVNTDESC\", fixed = TRUE ) ) ) ) #> Initializing tm_t_tte #> Initializing reporter_previewer_module if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/validate_arm.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"Check vector valid used treatment arm variable","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/validate_arm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"","code":"validate_arm(arm_vec)"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/validate_arm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"arm_vec vector validated","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/validate_arm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check if vector is valid as to be used as a treatment arm variable — validate_arm","text":"validate error returned vector factor detailed error message entries empty strings","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/validate_standard_inputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate standard input values for a teal module — validate_standard_inputs","text":"","code":"validate_standard_inputs( adsl, adslvars = character(0), anl, anlvars = character(0), need_arm = TRUE, arm_var, ref_arm, comp_arm, min_n_levels_armvar = 1L, max_n_levels_armvar = 100L, min_nrow = 1 )"},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/reference/validate_standard_inputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate standard input values for a teal module — validate_standard_inputs","text":"adsl data.frame subject-level data adslvars required variables ADSL anl data.frame analysis data anlvars required variables ANL need_arm flag indicating whether grouping variable arm_var required can optionally NULL. arm_var character name grouping variable, typically arm ref_arm character name reference level arm_var comp_arm character name comparison level arm_var min_n_levels_armvar minimum number levels grouping variable arm_var. Defaults 1, NULL minimum. max_n_levels_armvar maximum number levels grouping variable arm_var. Use NULL maximum. min_nrow minimum number observations ADSL ANL","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-9-1-9042","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.9.1.9042","text":"Added teal.logger functionality logging changes shiny inputs modules. Introduced ylim parameter tm_g_km module controls width y-axis. Added functionality tm_t_events_patyear split columns multiple (nested) variables via arm_var argument. Added arguments arm_var_labels template_summary show_arm_var_labels tm_t_summary allow user display arm variable (arm_var) labels table header. Added argument stats modules tm_g_forest_rsp tm_g_forest_tte allow users specify statistics include table. Added argument riskdiff modules tm_g_forest_rsp tm_g_forest_tte allow users add risk difference table column. Added count_dth count_wd parameters tm_t_events_summary select/deselect “Total number deaths” “Total number patients withdrawn study due AE” rows, respectively. options correspond “Count deaths” “Count withdrawals due AE” checkboxes available module run.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-9-1-9042","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.9.1.9042","text":"Removed Show Warnings modals modules. Clarified documentation specifying whether multiple values can selected arm_var argument module. Replaced use rtables::add_colcounts() function show_colcounts argument basic_table(). Began deprecation cycle show_labels argument template_summary effect tm_t_summary module. Replaced instances deprecated strata argument tern::control_lineplot_vars() group_var.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-9-1-9042","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.9.1.9042","text":"Fixed bug creating modules delayed_data teal.transform::all_choices.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-091","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.9.1","title":"teal.modules.clinical 0.9.1","text":"CRAN release: 2024-04-27","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-9-1","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.9.1","text":"Updated tm_g_forest_rsp tm_g_forest_tte use refactored version g_forest. Plots now displayed ggplot objects instead grob objects. Added parameters font_size rel_width_forest control font size width plot relative table, respectively. Updated tm_t_summary_by allow NULL input paramcd argument. Updated tm_g_km use refactored version g_km. Plots now displayed ggplot objects instead grob objects. Added parameters rel_height_plot, font_size, control_annot_surv_med, control_annot_coxph control height plot relative table, font size, median survival time table size, Cox-PH table size, respectively. Added control argument tm_t_binary_outcome control settings analysis (methods, confidence intervals, odds ratios) within module.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-9-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.9.1","text":"Replaced instances deprecated na_level argument tern functions na_str. Replaced argument/list element name strata instead strat tern function calls following deprecation argument/name within tern. Removed formatters dependencies replaced use functions relating variable labels functions teal.data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-090","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.9.0","title":"teal.modules.clinical 0.9.0","text":"CRAN release: 2024-02-23","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"breaking-changes-0-9-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"teal.modules.clinical 0.9.0","text":"Adapted modules use teal_data objects. Module arguments previously accepted inputs teal.transform::choices_selected() teal.transform::data_extract_spec() now accept input teal.transform::choices_selected(). affected modules : tm_a_gee, tm_a_mmrm, tm_g_ci, tm_g_forest_rsp, tm_g_forest_tte, tm_g_ipp, tm_g_km, tm_g_lineplot, tm_g_pp_adverse_events, tm_g_pp_patient_timeline, tm_g_pp_therapy, tm_g_pp_vitals, tm_t_abnormality, tm_t_abnormality_by_worst_grade, tm_t_ancova, tm_t_binary_outcome, tm_t_coxreg, tm_t_events, tm_t_events_by_grade, tm_t_events_patyear, tm_t_events_summary, tm_t_exposure, tm_t_logistic, tm_t_mult_events, tm_t_pp_basic_info, tm_t_pp_laboratory, tm_t_pp_medical_history, tm_t_pp_prior_medication, tm_t_shift_by_arm, tm_t_shift_by_arm_by_worst, tm_t_shift_by_grade, tm_t_smq, tm_t_summary, tm_t_summary_by, tm_t_tte","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-9-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.9.0","text":"Updated documentation vignettes demonstrate method pass teal_data object teal::init(). Simplify examples vignettes code removing package prefixes possible. Added parameter sort_freq_col tm_t_events allow user select column use sorting decreasing frequency. Added parameter incl_overall_sum tm_t_events allow user choose whether overall summary rows included top table. Updated documentation vignettes demonstrate method pass teal_data object teal::init(). Added default_total_label set_default_total_label functions get set default total column label (total_label) modules. Implemented tern::default_na_str tern::set_default_na_str functions get set default missing value replacement string (na_level) modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-9-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.9.0","text":"Fixed bug tm_g_lineplot forcing module initialize table. Fixes partial matching.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-9-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.9.0","text":"Deprecated aval argument tm_t_pp_laboratory tm_g_pp_vitals replaced aval_var argument. Deprecated avalu argument tm_t_pp_laboratory replaced avalu_var argument. Deprecated base_var argument tm_g_ipp, tm_t_shift_by_arm, template_shift_by_arm_by_worst replaced baseline_var argument. Specified minimal version package dependencies. Replaced usage deprecated summarize_vars function analyze_vars. Reduced package dependencies (removed tidyr, rlang, magrittr styler). Introduced tests partial matching.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-16","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.16","text":"Added informative error message grade mapping error occurs tm_t_abnormality_by_worst_grade. Fixed label indentation tm_t_abnormality_by_worst_grade. Added total_label argument enable customization “Patients” column/row label following modules: tm_a_mmrm, tm_t_abnormality, tm_t_abnormality_by_worst_grade, tm_t_binary_outcome, tm_t_events, tm_t_events_by_grade, tm_t_events_patyear, tm_t_events_summary, tm_t_exposure, tm_t_mult_events, tm_t_shift_by_arm, tm_t_shift_by_arm_worst, tm_t_shift_by_grade, tm_t_smq, tm_t_summary, tm_t_summary_by, tm_t_tte. Increased default width tm_g_forest_tte plot prevent overlapping text. Improved default annotation table sizing tm_g_km. Refactored tm_t_exposure display “total” row last row table instead summary row. Added parameters add_total_row set whether total row displayed total_row_label set total row label. Updated tm_t_events maintain indentation pruning. Updated default reference/comparison arm level selection work arm variable levels filtered . Updated tm_t_coxreg drop factor covariate variable levels present avoid errors filtering. Updated tm_t_pp_basic_info, tm_t_pp_medical_history, tm_g_pp_therapy, tm_g_pp_adverse_events, tm_t_pp_laboratory print patient ID table. Updated tm_t_pp_basic_info, tm_g_pp_therapy, tm_g_pp_adverse_events, tm_t_pp_laboratory use rlistings print data neatly reports. Updated tm_g_lineplot allow user remove interval plot. Updated documentation vignettes demonstrate method pass teal_data object teal::init().","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-16","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.16","text":"Fixed bug tm_t_coxreg preventing table displayed covariates selected.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-16","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.16","text":"Updated control_incidence_rate parameter names tm_t_events_patyear time_unit_input time_unit_output input_time_unit num_pt_year, respectively, parameter names changed tern. Hid datasets used patient profile modules filter panel. Replaced datanames = \"\" parameter datasets used internally module.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"breaking-changes-0-8-15","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.modules.clinical 0.8.15","text":"Replaced chunks simpler qenv class. Replaced datasets argument containing FilteredData new arguments data (tdata object) filter_panel_api (FilterPanelAPI).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-15","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.15","text":"Replaced synthetic_cdisc_data refactored synthetic_cdisc_dataset function speed dataset loading tests/examples. Added new GEE module tm_a_gee. Added interface selecting interaction term tm_t_ancova. Updated encoding input checks use shinyvalidate::InputValidator better UI experience. Previously used shiny::validate. Added option tm_a_mmrm allow Kenward-Roger adjustments standard errors p-values. Added option choose facet scale options tm_g_barchart_simple. Added label parameter cs_to_select_spec/cs_to_des_select cs_to_filter_spec/cs_to_des_filter allow user customize label printed selection field. Updated tm_t_coxreg module refactoring summarize_coxreg tern fix indentation. Updated tm_t_exposure module use new function analyze_patients_exposure_in_cols fix table structure.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-15","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.15","text":"Fixed bug causing overlapping bars tm_g_barchart_simple. Fixed bug figures svg format. Fixed bug tm_t_summary tm_t_summary_by preventing users specifying numeric_stats argument.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-15","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.15","text":"Updated package Suggests use scda.2022 rather scda.2021. Removed unused argument param tm_g_pp_vitals. Removed optimizer choice tm_a_mmrm since can always use automatically determined optimizer. Created datasets use examples/tests adsl, adae, adaette, adcm, adeg, adex, adlb, admh, adqs, adrs, adtte, advs. datasets stored data folder accessible via tmc_ex_* prefix. Updated examples tests use datasets teal.modules.clinical package instead scda datasets. Updated tests use testthat 3rd edition replaced applicable tests snapshot testing. Implemented lubridate package date variables internal data. Changed default value plot_width tm_g_forest_rsp prevent clutter.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-14","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.14","text":"Updated synthetic data tests version rcd_2022_02_28. Updated test files tests/testthat/ synthetic_cdisc_data(\"2022_02_28\") Reverted missing data checkbox tm_t_summary (encoding filtering separate). Implemented new widget allows dragging dropping select comparison groups. Added teal.reporter functionality modules. Enhanced tm_t_pp_medical_history module use table_with_settings module return rtables object. Implemented nestcolor examples, refactored tm_g_barchart_simple allow use nestcolor. Added descriptive title/labels visit name subtitle tm_g_ci. Updated tm_a_mmrm column name deselecting treatment “obs” “Patients”, added subtitles footnotes. Added title parameter category subtitle tm_t_exposure, cleaned labels. Added titles worse flag variable subtitles tm_t_shift_by_grade tm_t_shift_by_arm_by_worst. Added footnote tm_t_events_patyear CI method. Added subtitle footnotes tm_g_km. Added Stratified Analysis CI method option panel tm_t_binary_outcome. Added validation covariate/visit conflicts tm_a_mmrm. Remove unnecessary brackets header tm_t_exposure. Hid footnotes tm_g_km tm_t_tte “Compare Treatments” .","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-14","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.14","text":"Fixed bug tm_g_barchart_simple prevented display graph. Fixed broken example tm_t_abnormality_by_worst_grade. Fixed bug tm_a_mmrm prevented table headers displaying. Fixed bug tm_g_forest_rsp deselecting endpoint. Fixed bug tm_t_binary_outcome crashed app deselecting paramcd. Fixed teal.reporter card names tm_t_smq. Fixed bug tm_t_shift_by_arm_by_worst adding validations choosing different endpoint values. Fixed bug tm_t_coxreg preventing footnotes displaying univariate models.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-14","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.14","text":"Added nestcolor dependency replaced deprecated function tern::color_palette nestcolor::color_palette.","code":""},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tm_g_pp_adverse_events-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"tm_g_pp_adverse_events","title":"teal.modules.clinical 0.8.13","text":"Updated position labels. Updated plot render color legend.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tm_t_summary_by-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"tm_t_summary_by","title":"teal.modules.clinical 0.8.13","text":"Enhanced module support geometric mean encoding panel.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tm_t_summary-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"tm_t_summary","title":"teal.modules.clinical 0.8.13","text":"Updated added footnote. Enhanced module support geometric mean encoding panel. Updated module display checkboxes numeric variables statistics numeric variables part selected. Updated validations warn users using dataset non unique identifiers selecting variables non supported types (.e. Date, POSIXt). Added checkbox remove column generated missing values.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"other-modules-0-8-13","dir":"Changelog","previous_headings":"Enhancements","what":"Other modules","title":"teal.modules.clinical 0.8.13","text":"Updated tm_t_binary_outcome enable option apply continuity correction Newcombe method. Simplified show R code tm_g_pp_patient_timeline module. Improved names code chunks shown Debug Info. Improved validation treatment variable factor.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-13","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.13","text":"Fixed summarize_logistic implementation broken empty string error. upstream. _NA_ new standard flag allow pivot empty entries data frames. Took @title tm_t_binary_outcome.R producing warning. Updated validation account error selecting single variable tm_g_pp_patient_timeline module.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-13","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.13","text":"Added pkgdown template documentation. Updated package authors.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-12","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.12","text":"Changed input Covariates tm_t_coxreg.R track user input reflect order table.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"new-features-0-8-12","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.12","text":"Added new module tm_t_shift_by_arm_by_worst analysis laboratory abnormalities severe grade flag. Enhanced tm_t_events_patyear include selected parameter title table. Enhanced tm_t_mult_events include selected parameter title table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-12","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.12","text":"Rewrote modules use moduleServer updated calls teal.devel modules also written use moduleServer. Changed way obtaining selection ordered changes teal.devel. Use ordered = TRUE cs_to_des_select cs_to_select_spec return ordered selection. Replaced calls teal::root_modules teal::modules following deprecation teal::root_modules. tm_t_events_summary now allows nested arm_var columns matching outputs tm_t_events. Added validation tm_t_abnormality_by_worst_grade arm_var selected. Enhanced tm_t_binary_outcome include responders response table default. Added subtitle tm_g_forest_tte, tm_t_coxreg, tm_t_binary_outcome listing stratification factors.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-12","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.12","text":"Fixed bug prevent processing empty sets data tm_g_forest_rsp.R causing shiny errors runtime. Fixed bug closed Compare Treatments conditional panel marked Combine comparison groups? option conflicted adding column patients tables tm_t_binary_outcome.R tm_t_tte.R.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-12-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.12","text":"Replaced deprecated rtables::var_labels calls documentation examples. Add import tern.mmrm package change references split tern. Adjusted package imports take account changes teal framework. Ensure consistent vertical order tm_g_pp_patient_timeline output switching absolute relative days.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"breaking-changes-0-8-11","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.modules.clinical 0.8.11","text":"Updated tm_t_abnormality due changes count_abnormal abnormal argument taking list input now. Changed tm_g_pp_patient_timeline parameter, cmtrt, cmdecod.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"new-features-0-8-11","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.11","text":"Added new module tm_t_abnormality_by_worst_grade analysis laboratory test results highest grade post-baseline. Enhanced tm_t_ancova include selected parameter(s), visit(s) analysis variable title table. Added new module tm_g_lineplot creating line plots. Enhanced tm_t_logistic include selected parameter title table. Enhanced tm_g_forest_rsp include selected parameter title table. Enhanced tm_g_forest_tte include selected parameter title table. Enhanced tm_g_pp_patient_timeline bold axes labels integer values axis. Enhanced tm_g_ipp allow users display AVALU title y axis.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-11","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.11","text":"Added support logging logger package added info level logs upon initialization module. Added default_responses argument tm_t_binary_outcome tm_g_forest_rsp allow user specify default selected responses possible response levels. Updated tm_t_binary_outcome show selected responses output table selecting “Show Selected Response Categories”. Added rsp_table argument tm_t_binary_outcome allow user initialize module matching RSPT01 STREAM template. Added support custom arguments ggplot2::labs ggplot2::theme plot based modules. Added support custom arguments rtables::basic_table table based modules. Updated tm_t_binary_outcome enable option apply continuity correction Wilson method.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-11","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.11","text":"Updated required R version >= 3.6. Refactored calls defunct teal.devel::data_extract_input calls replacement teal.devel::data_extract_ui. Updated modules use new data_merge_module interface provided teal.devel removed usage now deprecated function teal.devel::get_input_order. Updated tm_t_binary_outcome module add template removed now deprecated module tm_t_rsp. Removed utils.nest dependency replaced calls checkmate equivalents.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-11","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"teal.modules.clinical 0.8.11","text":"Fixed bug tm_g_pp_therapy cmstdy cmendy argument type integer causes plot crash.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"new-features-0-8-10","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.10","text":"Added new module tm_t_smq analysis adverse events Standardized MedDRA Query. Added new module tm_t_shift_by_grade analysis grade laboratory abnormalities. Added new module tm_t_exposure analysis duration exposure risk management plan. Added new module tm_t_shift_by_arm can display shift table ECG interval data.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-10","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.10","text":"Corrected tm_a_mmrm able consider treatment variable interactions. Fixed tm_t_binary_outcome tm_t_rsp choose correct CI estimation method Proportions Difference Stratified Analysis (.e. Wald-type confidence interval CMH weights).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-10","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.10","text":"Added validation checks tm_t_rsp tm_t_binary_outcome stratification errors applied filters. Added tm_g_km validation check plot tables font size. Enhanced tm_g_km add selected paramcd plot title. tm_t_events now can display layouts two nested column treatment variables. options pruning sorting available. Exported package helper functions. Updated tm_t_events_by_grade display grading groups nested columns col_by_grade option support pruning sorting options like tm_t_events. Used format_count_fraction fix formatting inconsistency tm_t_events_summary. Updated count_occurrences vars argument tm_t_shift_by_grade. Updated tm_t_pp_laboratory display 4 decimals default. Updated tm_t_events_by_grade use trim_levels_in_group split function instead trim_rows function. Added table title tm_t_tte. Added table titles tm_t_rsp tm_t_binary_outcome.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-10","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.10","text":"Updated LICENCE README new package references. Added error_on_lint: TRUE .lintr. Removed insert_rrow updated usage count_patients_by_flags tm_t_events_summary. Changed package calls functions dplyr package. functions now fully specified (e.g. dplyr::filter).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"new-features-0-8-9","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.modules.clinical 0.8.9","text":"Added capability remember order user input encoding UI elements. Inputs marked double arrow icon tracking enabled. affected modules : tm_t_summary, tm_t_summary_by, tm_g_forest_rsp, tm_g_forest_tte, tm_t_events_summary, tm_t_abnormality, tm_t_mult_events. Added new argument numeric_stats tm_t_summary tm_t_summary_by control displayed summary statistics numeric variables. Added new argument drop_zero_levels tm_t_summary_by can drop rows zeros result table.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-9","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.9","text":"Split tm_g_patient_profile tabs 8 separate new modules. Added option select patient ID filter panel modules patient profile. Added validation tm_g_patient_timeline plot empty. Enhanced tm_a_mmrm work without treatment variable. Added option choose number decimal places rounding tm_t_pp_laboratory. Added check box tm_g_pp_patient_timeline hiding/showing relative study days x-axis. Added title patient’s id plots patient profile modules. Made gray error message tm_g_forest_tte informative deselecting Endpoint column left-hand encoding panel. Added twenty-fifth seventy-fifth quantile summary statistics tm_t_summary. Added interaction p-value column tm_t_coxreg. Added validation tm_t_ancova selected covariate variables contain one level. Added validation tm_t_events_patyear events variable empty. Changed font size input description tm_g_km precisely describe controls. Enhanced tm_t_logistic interaction choices depend selected covariates. Enhanced tm_t_rsp strata input visible comparing treatments.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-9","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.9","text":"Fixed Get R Code output tm_t_pp_laboratory return identical HTML formatted table displayed app. Added validation tm_t_coxreg ensure treatment, strata covariate variables overlap. Limited label repel feature tm_g_pp_patient_timeline X-axis consistent look. Updated tm_t_summary_by paramcd required analyzing ADSL variables. Updated tm_t_coxreg can work covariate selected. Updated tm_a_mmrm can work treatment variable selected. Updated tm_g_forest_tte total number events also shown table. Updated tm_t_events_summary work pooled studies. Updated validation level tm_t_coxreg. Updated validation level tm_t_logistic. Added validation tm_t_binary_outcome tm_t_rsp ensure strata variable contains one level selecting one strata variable. Updated warning message deselecting statistics tm_t_summary tm_t_summary_by explain need select least one statistic.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-8","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.8","text":"Added option download expand tables. tm_g_km added support downloading images updated x-axis label show title case. Added slider font size plots. Added persistence selected table lengths. timeline plot now supports edge cases. vitals tab, removed unused label text legend, updated plot display stable colors per levels, cleared x-axis limit fixed legend update filtering. Also added note clarify supported horizontal lines cases. Updated adverse events tab show warning message instead empty plot data empty. Fixed PARAMCD selected levels current patient. Updated pre-processing code inside template_tte dataset without events still produces table. Updated code use correct denominator duration response endpoints. Modified parameter arm_var accept one column. selecting two columns arm_var, second variable nest first one. Added argument show_labels template_summary show label single summary variable table. Added new parameter conf_arg tm_t_rsp consistent efficacy modules. Added validation statement tm_g_ipp module print message deselecting Timepoint Variable drop-. Removed header definition tm_g_forest_rsp tm_g_forest_tte now default header g_forest. Fixed validation statement tm_t_coxreg models without strata using likelihood tests return result. Clarified functionality drop_arm_levels tm_t_summary tm_t_summary_by. encodings panel, checkbox show parent dataset analysis dataset different.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-8","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.8","text":"Replaced remaining two observe function calls observeEvent optimize performance. Fixed grammar “Select patient’s id” error message tm_g_patient_profile. Fixed font_size default templates 12L instead vector 3 integers cleaned associated unnecessary code. Fixed deprecated function warning tm_g_barchart_simple. Fixed subgroup_var definition truncation tm_g_forest_rsp tm_g_forest_tte. Clarified labeling related regression type encoding panel tm_t_coxreg.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-8","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.8","text":"Added validation case filtering rows therapy tab tm_g_patient_profile. Updated internals modules read data correct field filter_spec objects. Fixed reactivity filter panel PARAMCD variable levels input tm_g_patient_profile vitals tab plot get reset filtering. Updated vitals plot tab tm_g_patient_profile drop NA entries plot. Updated tm_t_coxreg take values account. Added check tm_t_coxreg interactions univariate models multivariate models. Updated tm_t_events_summary work pooled studies.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"new-module-0-8-7","dir":"Changelog","previous_headings":"","what":"New Module","title":"teal.modules.clinical 0.8.7","text":"Added new module tm_g_patient_profile profile patients based predefined categories. Added new module tm_g_ipp individual patient plots.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-7","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.7","text":"Added argument drop_arm_levels safety modules. allows removal columns based factor levels found filtered data. Updated tm_g_km allow plot failure probability y-axis, tick interval selection x-axis option create plot without confidence interval ribbon (new default). Added argument time_unit_var template_g_km add time unit x-axis label.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-7","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.7","text":"Removed redundant Analysis Data: label Encodings Panel. Removed limit requiring 15 fewer columns tabulation modules. New upper threshold 100 columns. Decreased lower limit number observations required modules. Safety tables require least one record. Requirements efficacy outputs per treatment group: tm_a_mmrm requires five records, tm_t_logistic tm_t_coxreg require two records, remaining modules require least one record per treatment group. graphs, lower threshold two records. Removed argument cnsr_val tm_t_events_patyear added new argument events_var. arm_ref_comp_observer include parentname argument. Show R code include datasets retrieved data_extract_spec objects. Refactored stringr dependency patient profile module. Added missing table calls chunks tm_t_events tm_t_events_by_grade.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"new-features-0-8-6","dir":"Changelog","previous_headings":"","what":"New Features","title":"teal.modules.clinical 0.8.6","text":"Added new module tm_g_ci confidence interval plots. Added new module tm_t_ancova analysis variance summary tables. Added new module tm_t_mult_events multi-event tables.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"enhancements-0-8-6","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.modules.clinical 0.8.6","text":"Refactored modules using redesigned rtables tern packages. Enhanced modules. now take advantage data_extract_spec data_merge_module functionality teal. Reduced clutter repeated datasets encodings panels. Updated modules use OptionalSelectInput conf_level.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"miscellaneous-0-8-6","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.modules.clinical 0.8.6","text":"Added vignette substitute can helpful developing analysis template functions teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"bug-fixes-0-8-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.modules.clinical 0.8.6","text":"Updated tm_t_events module use user’s non-default choices prune_freq prune_diff.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-085","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.5","title":"teal.modules.clinical 0.8.5","text":"graph modules now accept plot_width argument specifies plot width renders slider adjust width interactively module. FilteredData object now passed arm_ref_comp_observer modules now support nested lists containing delayed_data objects. Replace plot_with_height module new plot_with_settings module. Update examples use code argument inside cdisc_dataset.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-084","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.4","title":"teal.modules.clinical 0.8.4","text":"Extend tm_t_coxreg optionally produce univariate Cox regressions. Updated tm_t_binary_outcome display Odds Ratio estimates, include new methods CIs p-values display summary individual response categories. Updated tm_t_tte optionally compare arms, removed conf_level argument. Updated tm_g_km optionally compare arms. Extend tm_g_km optionally scale X axis range case one plot. New tm_a_mmrm MMRM analysis. Deprecated tm_t_mmrm (superseded tm_a_mmrm).","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-083","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.3","title":"teal.modules.clinical 0.8.3","text":"New tm_t_coxreg module multi-variable Cox regressions. New tm_t_binary_outcome module. New tm_t_events_patyear module: events rate adjusted patient-year risk table. Remove grade_levels argument tm_t_events_by_grade. Updated response table single arm. New tm_t_abnormality module. Removed get_relabel_call get_relabel_call2 favor teal.devel::get_relabel_call teal.devel::get_anl_relabel_call.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-082","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.2","title":"teal.modules.clinical 0.8.2","text":"Add confidence level survfit, coxph, ztest; add confidence type, ties, percentiles tm_t_tte. Optionally use single term tm_t_events tm_t_events_by_grade modules. New tm_t_logistic module. New tm_t_mmrm module. New modules tm_t_summary_by tm_t_events_summary. Add stratified analysis tm_g_forest_tte tm_g_forest_rsp. Add confidence level plotting symbol size options tm_g_forest_rsp tm_g_forest_tte.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-081","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.1","title":"teal.modules.clinical 0.8.1","text":"New tm_t_events tm_t_events_by_grade modules.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-080","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.8.0","title":"teal.modules.clinical 0.8.0","text":"Optionally show KM CoxPH table tm_g_km.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-070","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.7.0","title":"teal.modules.clinical 0.7.0","text":"Use teal.devel.","code":""},{"path":"https://insightsengineering.github.io/teal.modules.clinical/main/news/index.html","id":"tealmodulesclinical-060","dir":"Changelog","previous_headings":"","what":"teal.modules.clinical 0.6.0","title":"teal.modules.clinical 0.6.0","text":"Package renamed teal.modules.clinical. Rename tm_t_summarize_variables tm_t_summary. Usage teal::choices_selected() function instead *_var *_var_choices arguments.","code":""}]