varColumn {desctable} | R Documentation |
Generate the variable column to display as row names
Description
Generates the variable column. Replaces the variable names by their label if given in the named character vector labels, and inserts levels for factors.
Usage
varColumn(data, labels = NULL)
Arguments
data |
The dataframe to get the names from |
labels |
The optional named character vector containing the keypairs var = "Label" |
Details
labels is an option named character vector used to make the table prettier. If given, the variable names for which there is a label will be replaced by their corresponding label. Not all variables need to have a label, and labels for non-existing variables are ignored.
Value
A dataframe with one variable named "Variables", a character vector of variable names/labels and levels
[Package desctable version 0.3.0 Index]