tbl_ae_count {gtreg} | R Documentation |
Tabulate Raw AE Counts
Description
Create a table counting all AEs.
Usage
tbl_ae_count(
data,
ae,
soc = NULL,
by = NULL,
strata = NULL,
by_values = NULL,
digits = NULL,
sort = NULL,
zero_symbol = "\U2014",
missing_location = c("first", "last", "hide")
)
Arguments
data |
Data frame |
ae |
Variable name of the adverse event column |
soc |
Variable name of the system organ class column |
by |
Variable to split results by, e.g. report AEs by grade |
strata |
Variable to stratify results by, e.g. report AEs summaries by treatment group |
by_values |
Optional vector of complete by values, listed in desired order, to achieve correct table structure for the situation in which an adverse event of a certain grade is not observed for a given soc |
digits |
Specifies the number of decimal places to round the summary statistics.
By default integers are shown to zero decimal places, and percentages are
formatted with |
sort |
Controls order of AEs and SOCs in output table.
The default is |
zero_symbol |
String used to represent cells with zero counts. Default
is the em-dash ( |
missing_location |
location where the column summarizing values with
missing levels |
Details
tbl_ae_count
counts all AEs (whereas tbl_ae
counts by maximum grade). Thus, tbl_ae_count
does
not provide percentages as multiple AEs can be counted per subject.
Value
a 'tbl_ae_count' object
Example Output
Example 1
See Also
Examples
# Example 1 -----------------------------------------------------------------
tbl_ae_count_ex1 <-
tbl_ae_count(
data = df_adverse_events,
ae = adverse_event,
soc = system_organ_class,
strata = trt,
by = grade
) %>%
modify_header(all_ae_cols() ~ "**Grade {by}**")