Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get.label.name

Get Names of Stata Label Set


Description

Retrieves the Stata label set in the dataset for all or an vector of variable names.

Usage

get.label.name(dat, var.name = NULL, lang = NA)

Arguments

dat

data.frame. Data.frame created by read.dta13.

var.name

character vector. Variable names. If NULL, get names of all label sets.

lang

character. Label language. Default language defined by get.lang is used if NA

Details

Stata stores factor labels in variable independent labels sets. This function retrieves the name of the label set for a variable.

Value

Returns an named vector of variable labels

Author(s)

Jan Marvin Garbuszus jan.garbuszus@ruhr-uni-bochum.de


readstata13

Import 'Stata' Data Files

v0.10.0
GPL-2 | file LICENSE
Authors
Jan Marvin Garbuszus [aut], Sebastian Jeworutzki [aut, cre] (<https://orcid.org/0000-0002-2671-5253>), R Core Team [cph], Magnus Thor Torfason [ctb], Luke M. Olson [ctb], Giovanni Righi [ctb], Kevin Jin [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.