get_value_labels: Retrieve the labels from the dictionary

View source: R/tables.R

get_value_labelsR Documentation

Retrieve the labels from the dictionary

Description

Retrieve the labels from the dictionary

Usage

get_value_labels(dictionary, indices, use.regex = getOption("use.regex"), ...)

Arguments

dictionary

A data dictionary

indices

Numeric vector; indices of the variables whose labels' values will be used

use.regex

Whether regular expressions will be used to extract the value(s)

...

Arguments passed to internal functions. These include redcap, a logical vector indicating whether the project data are on REDCap or not. Others are multiresponse ("are the labels for multiresponse questions?") and ignore.case - used as in base::grep.

Details

This function is used differently across the various GBV projects. Specifically, the patterns used in the projects that had data hosted on REDCap are peculiar. For other projects, we either set getOption('use.regex') to FALSE or specify a pattern for extraction.

Value

A character vector of the labels, possibly modified internally.


BroVic/jGBV documentation built on Oct. 9, 2022, 6:38 a.m.