computeSummaryStatisticsByRowColVar {inTextSummaryTable} | R Documentation |
Compute summary statistics by specified rowVar
and colVar
Description
Compute summary statistics by specified rowVar
and colVar
Usage
computeSummaryStatisticsByRowColVar(
data,
var = NULL,
varLab = getLabelVar(var = var, data = data, labelVars = labelVars),
varInclude0 = FALSE,
varLabInclude = length(var) > 1,
varTotalInclude = FALSE,
type = "auto",
rowVar = NULL,
rowInclude0 = FALSE,
rowVarDataLevels = NULL,
colVar = NULL,
colInclude0 = FALSE,
colVarDataLevels = NULL,
subjectVar = "USUBJID",
labelVars = NULL,
statsExtra = NULL,
msgLabel = NULL,
checkVarDiffBySubj = "error"
)
Arguments
data |
Data.frame with dataset to consider for the summary table. |
var |
Character vector with variable(s) of |
varLab |
Named character vector with label for each variable
specified in |
varInclude0 |
Logical, should rows with no counts
for the count
|
varLabInclude |
Logical, if TRUE
the name of the summary statistic variable(s) ( |
varTotalInclude |
Should the total across all categories of
|
type |
String with type of table:
|
rowVar |
Character vector with variable(s) to be included in the rows. If multiple variables are specified, the variables should be sorted in hierarchical order (e.g. body system class before adverse event term) and are nested in the table. |
rowInclude0 |
Logical, if TRUE (FALSE by default),
include rows with no records, based on all combinations
of the |
rowVarDataLevels |
Data.frame with unique combinations of |
colVar |
Character vector with variable(s) to be included in columns.
If multiple variables are specified, the variables should
be sorted in hierarchical order,
and are included in multi-columns layout. |
colInclude0 |
Logical, if TRUE (FALSE by default),
include columns with no records, based on all combinations
of the |
colVarDataLevels |
Data.frame with unique combinations of |
subjectVar |
String, variable of |
labelVars |
(optional) Named character vector with label for
the row, column variable(s) or variable(s) to summarize. |
statsExtra |
(optional) Named list with functions for additional custom
statistics to be computed.
For example, to additionally compute the coefficient of variation, this can be set to:
|
checkVarDiffBySubj |
String, 'error' (default), 'warning',
or 'none'.
Should an error, a warning, or nothing be produced
if a continuous variable ( |
Value
data.frame of class 'countTable' or 'summaryTable',
depending on the 'type' parameter; with statistics in columns,
either if type
is:
'summaryTable':
'N': number of subjects
'Mean': mean of
var
'SD': standard deviation of
var
'SE': standard error of
var
'Median': median of
var
'Min': minimum of
var
'Max': maximum of
var
'm': number of records
'countTable':
'N': number of subjects
'm': number of records
Author(s)
Laure Cougnaud