convertVarRowVarColVarToFactor: Convert 'rowVar', 'colVar' and character 'var' in 'data' to...

View source: R/miscellaneous.R

convertVarRowVarColVarToFactorR Documentation

Convert rowVar, colVar and character var in data to factor

Description

Convert rowVar, colVar and character var in data to factor

Usage

convertVarRowVarColVarToFactor(data, rowVar = NULL, colVar = NULL, var = NULL)

Arguments

data

Data.frame with dataset to consider for the summary 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.

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.

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).

Value

Updated data

Author(s)

Laure Cougnaud


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