-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmake_table_36.Rd
92 lines (78 loc) · 3.97 KB
/
make_table_36.Rd
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
92
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fda-table_36.R
\name{make_table_36}
\alias{make_table_36}
\title{Table 36. Patients With Adverse Events by System Organ Class and Preferred Term, Safety
Population, Pooled Analysis (or Trial X)}
\usage{
make_table_36(
adae,
alt_counts_df = NULL,
show_colcounts = TRUE,
id_var = "USUBJID",
arm_var = "ARM",
saffl_var = "SAFFL",
soc_var = "AESOC",
pref_var = "AEDECOD",
lbl_soc_var = formatters::var_labels(adae, fill = TRUE)[soc_var],
lbl_overall = NULL,
risk_diff = NULL,
prune_0 = FALSE,
annotations = NULL
)
}
\arguments{
\item{adae}{(\code{data.frame})\cr dataset (typically ADAE) required to build table.}
\item{alt_counts_df}{(\code{character})\cr alternative dataset (typically ADSL) used only to calculate column counts.}
\item{show_colcounts}{(\code{flag})\cr Whether column counts should be printed. Boolean.}
\item{id_var}{(\code{character})\cr variable used as unique subject identifier.}
\item{arm_var}{(\code{character})\cr Name of the treatment arm variable used to split table into columns.}
\item{saffl_var}{(\code{character})\cr flag variable used to indicate inclusion in safety population.}
\item{soc_var}{(\code{character})\cr Name of the system organ class variable from \code{adae} to include in the table.}
\item{pref_var}{(\code{character})\cr Name of the preferred term variable from \code{adae} to include in the table.}
\item{lbl_soc_var}{(\code{character})\cr label corresponding to system organ class variable \code{soc_var} to print in the
table.}
\item{lbl_overall}{(\code{character})\cr if specified, an overall column will be added to the table with
the given value as the column label.}
\item{risk_diff}{(named \code{list})\cr list of settings to apply to add one or more risk difference columns to the table.
Defaults to \code{NULL} (no risk difference column added). See \code{\link[tern:add_riskdiff]{tern::add_riskdiff()}} for more details. List should
contain the following elements:
\itemize{
\item \code{arm_x}: (required) the name of reference arm.
\item \code{arm_y}: (required) the names of the arms to compare to the reference arm. A new column will be added for each
element of \code{arm_y}.
\item \code{col_label}: (optional) labels to use for the risk difference columns. Defaults to
\code{"Risk Difference (\%) (95\% CI)"}. For more than one risk difference column, \code{"arm x vs. arm y"} text will also
be included in the column labels by default. The length of \code{col_label} must be equal to the length of \code{arm_y}.
\item \code{pct}: (optional) whether the output should be returned as percentages. Defaults to \code{TRUE}.
}}
\item{prune_0}{(\code{flag})\cr Whether all-zero rows should be removed from the table. Boolean.}
\item{annotations}{(named \code{list} of \code{character})\cr list of annotations to add to the table. Valid
annotation types are \code{title}, \code{subtitles}, \code{main_footer}, and \code{prov_footer}. Each name-value pair should
use the annotation type as name and the desired string as value.}
}
\value{
\itemize{
\item \code{make_table_36} returns an \code{rtables} table object.
}
}
\description{
Table 36. Patients With Adverse Events by System Organ Class and Preferred Term, Safety
Population, Pooled Analysis (or Trial X)
}
\details{
\itemize{
\item \code{adae} must contain the variables specified by \code{id_var}, \code{arm_var}, \code{saffl_var}, \code{soc_var},
and \code{pref_var}.
\item If specified, \code{alt_counts_df} must contain the variables specified by \code{arm_var}, \code{id_var}, and \code{saffl_var}.
\item Columns are split by arm. Overall population column is excluded by default (see \code{lbl_overall} argument).
\item Numbers in table represent the absolute numbers of patients and fraction of \code{N}.
\item All-zero rows are removed by default (see \code{prune_0} argument).
}
}
\examples{
adsl <- random.cdisc.data::cadsl
adae <- random.cdisc.data::cadae
tbl <- make_table_36(adae = adae, alt_counts_df = adsl)
tbl
}