varColumn: Generate the variable column to display as row names

View source: R/build.R

varColumnR 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


desctable documentation built on March 24, 2022, 5:07 p.m.