-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathtemplate_events.Rd
More file actions
91 lines (74 loc) · 3.96 KB
/
template_events.Rd
File metadata and controls
91 lines (74 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tm_t_events.R
\name{template_events}
\alias{template_events}
\title{Template: Events by Term}
\usage{
template_events(
dataname,
parentname,
arm_var,
hlt,
llt,
label_hlt = NULL,
label_llt = NULL,
add_total = TRUE,
total_label = default_total_label(),
na_level = tern::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()
)
}
\arguments{
\item{dataname}{(\code{character})\cr analysis data used in teal module.}
\item{parentname}{(\code{character})\cr parent analysis data used in teal module, usually this refers to \code{ADSL}.}
\item{arm_var}{(\code{character})\cr variable names that can be used as \code{arm_var}.}
\item{hlt}{(\code{character})\cr name of the variable with high level term for events.}
\item{llt}{(\code{character})\cr name of the variable with low level term for events.}
\item{label_hlt}{(\code{string})\cr label of the \code{hlt} variable from \code{dataname}. The label will be extracted from the
module.}
\item{label_llt}{(\code{string})\cr label of the \code{llt} variable from \code{dataname}. The label will be extracted from the
module.}
\item{add_total}{(\code{logical})\cr whether to include column with total number of patients.}
\item{total_label}{(\code{string})\cr string to display as total column/row label if column/row is
enabled (see \code{add_total}). Defaults to \code{"All Patients"}. To set a new default \code{total_label} to
apply in all modules, run \code{set_default_total_label("new_default")}.}
\item{na_level}{(\code{string})\cr used to replace all \code{NA} or empty values
in character or factor variables in the data. Defaults to \code{"<Missing>"}. To set a
default \code{na_level} to apply in all modules, run \code{set_default_na_str("new_default")}.}
\item{event_type}{(\code{character})\cr type of event that is summarized (e.g. adverse event, treatment). Default
is \code{"event"}.}
\item{sort_criteria}{(\code{character})\cr how to sort the final table. Default option \code{freq_desc} sorts
on column \code{sort_freq_col} by decreasing number of patients with event. Alternative option \code{alpha} sorts events
alphabetically.}
\item{sort_freq_col}{(\code{character})\cr column to sort by frequency on if \code{sort_criteria} is set to \code{freq_desc}.}
\item{prune_freq}{(\code{number})\cr threshold to use for trimming table using event incidence rate in any column.}
\item{prune_diff}{(\code{number})\cr threshold to use for trimming table using as criteria difference in
rates between any two columns.}
\item{drop_arm_levels}{(\code{logical})\cr whether to drop unused levels of \code{arm_var}. If \code{TRUE}, \code{arm_var} levels are
set to those used in the \code{dataname} dataset. If \code{FALSE}, \code{arm_var} levels are set to those used in the
\code{parentname} dataset. If \code{dataname} and \code{parentname} are the same, then \code{drop_arm_levels} is set to \code{TRUE} and
user input for this parameter is ignored.}
\item{incl_overall_sum}{(\code{flag})\cr whether two rows which summarize the overall number of adverse events
should be included at the top of the table.}
\item{basic_table_args}{(\code{basic_table_args}) optional\cr object created by \code{\link[teal.widgets:basic_table_args]{teal.widgets::basic_table_args()}}
with settings for the module table. The argument is merged with option \code{teal.basic_table_args} and with default
module arguments (hard coded in the module body).
For more details, see the vignette: \code{vignette("custom-basic-table-arguments", package = "teal.widgets")}.}
}
\value{
a \code{list} of expressions to generate a table or plot object.
}
\description{
Creates a valid expression to generate a table of events by term.
}
\seealso{
\code{\link[=tm_t_events]{tm_t_events()}}
}
\keyword{internal}