get.label | R Documentation |
Retrieve the value labels for a specific Stata label set.
get.label(dat, label.name)
dat |
data.frame. Data.frame created by |
label.name |
character. Name of the Stata label set |
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
.
Returns a named vector of code numbers
Jan Marvin Garbuszus jan.garbuszus@ruhr-uni-bochum.de
Sebastian Jeworutzki sebastian.jeworutzki@ruhr-uni-bochum.de
dat <- read.dta13(system.file("extdata/statacar.dta", package="readstata13")) labname <- get.label.name(dat,"type") get.label(dat, labname)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.