computeSummaryStatisticsTableTotal: Compute summary statistics total table.

View source: R/computeSummaryStatisticsTable.R

computeSummaryStatisticsTableTotalR Documentation

Compute summary statistics total table.

Description

Compute summary statistics total table.

Usage

computeSummaryStatisticsTableTotal(
  data,
  colVar = NULL,
  colVarTotal = colVar,
  rowVarTotal = NULL,
  var = NULL,
  varLab = getLabelVar(var, data = data, labelVars = labelVars),
  colTotalLab = "Total",
  colInclude0 = FALSE,
  colTotalInclude = FALSE,
  dataTotalCol = NULL,
  colVarDataLevels = NULL,
  colVarLevels = NULL,
  subjectVar = "USUBJID",
  labelVars = NULL,
  msgLabel = "total",
  checkVarDiffBySubj = "error"
)

Arguments

data

Data.frame with dataset to consider for the summary table.

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.
Use: 'variable' to include the variables to summarize: var (if multiple) in different columns.

colVarTotal

Character vector with column(s) considered to compute the total. This could also contain 'variable'.

rowVarTotal

Character vector with row(s) considered to compute the total. This could also contain 'variable'.

var

Character vector with variable(s) of data, to compute statistics on.
If NULL (by default), counts by row/column variable(s) are computed.
To also return counts of the rowVar in case other var are specified, you can include: 'all' in the var.
Missing values, if present, are filtered (also for the report of number of subjects/records).

colTotalLab

String, label for the total column 'Total' by default.

colTotalInclude

Logical, if TRUE (FALSE by default) include the summary statistics across columns in a separated column.

dataTotalCol

Data.frame from which the total across columns is extracted (in case colTotalInclude is TRUE).

colVarLevels

list with levels of each colVar

subjectVar

String, variable of data with subject ID, 'USUBJID' by default.

labelVars

(optional) Named character vector with label for the row, column variable(s) or variable(s) to summarize.
Labels specified via dedicated parameter: e.g. rowVarLab, colVarLab, varLab have priority on this parameter.

msgLabel

(optional) String with label for the data ('total' by default), included in the message/warning for checks.

Value

data.frame with total table.

Author(s)

Laure Cougnaud


inTextSummaryTable documentation built on Sept. 12, 2023, 5:06 p.m.