Labels: 'Labels'

Description Usage Arguments Details Value

View source: R/labels.R

Description

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

Usage

1
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 Nov. 28, 2019, 12:36 a.m.