get.label: Get Stata Label Table for a Label Set

Description Usage Arguments Details Value Author(s) Examples

View source: R/tools.R

Description

Retrieve the value labels for a specific Stata label set.

Usage

1
get.label(dat, label.name)

Arguments

dat

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

label.name

character. Name of the Stata label set

Details

This function returns the table of factor levels which represent a Stata label set. The name of a label set for a variable can be obtained by get.label.name.

Value

Returns a named vector of code numbers

Author(s)

Jan Marvin Garbuszus [email protected]

Sebastian Jeworutzki [email protected]

Examples

1
2
3
dat <- read.dta13(system.file("extdata/statacar.dta", package="readstata13"))
labname <- get.label.name(dat,"type")
get.label(dat, labname)

readstata13 documentation built on May 29, 2017, 6:38 p.m.