Labels: 'Labels'

View source: R/labels.R

LabelsR Documentation

Labels

Description

Replaces a list of given names or coefficient, with any underlying labels. If

Usage

Labels(x, names.to.lookup = NULL, show.name = FALSE)

Arguments

x

A data.frame.

names.to.lookup

An optional list of the names of the variables or coefficients (e.g., Q2Cola for a factor).

show.name

If TRUE, the name will prefix the extended label (where they are distinct). Ignored if names.to.lookup is provided.

Details

First tries to find the "label" attribute, then "name", then "question", and lastly looks to the variable's name. Where names.to.lookup is provided, Works for dummy variables as well as normal variables. Trims backticks and whitespace. Returns names where labels cannot be found.

Value

A vector of labels


Displayr/flipFormat documentation built on Feb. 26, 2024, 12:37 a.m.