help mata elabel_dir()

Title

elabel_dir() -- Obtain lists of value label names

Syntax

string colvector elabel_dir()

void
elabel_dir(names
[, real scalar mlang])

void
elabel_dir(nonexistent,
orphans,
used [,
real scalar mlang])

where the types of names, nonexistent, orphans, and used
is irrelevant because they are replaced with string colvectors.

mlang!=0 respects multilingual datasets (see label language)

Description

elabel_dir() returns a column vector with all value label names stored
in memory.

elabel_dir(names [, mlang]) places in names
a column vector of value labels attached to at least one variable in the
dataset, including value labels that are not stored in memory (nonexistent
value
labels). Value labels in memory that are not used by any of the variables
(so-called orphans) are omitted. mlang=0 restricts nonexisting value
labels to those in the current label language.

elabel_dir(nonexistent, orphans, used
[, mlang]) places in nonexistent a column vector of
value labels that are not stored in memory but attached to at least one
variable in the dataset; in orphans a column vector of value labels
that are stored in memory but are not used by any of the variables in the
dataste; in used a column vector of value labels that are stored in
memory and used by at least one variable in the dataset. mlang=0
considers value labels in the current label language only.

See elabel_ldir() to obtain a list of label languages.

Conformability

elabel_dir()
result: r x 1

elabel_dir(names[, mlang])
input:
names: r x c
mlang: 1 x 1
output:
names: r x 1

elabel_dir(nonexistent, orphans, used[, mlang])
input:
nonexistent: r x c
orphans: r x c
used: r x c
mlang: 1 x 1
output:
nonexistent: r x 1
orphans: r x 1
used: r x 1

Diagnostics

elabel_dir() is implemented in terms of Stata's label dir
command.

elabel_dir() returns J(0, 1, "") if no value labels are in
memory. names, nonexistent, orphans, and used are
replaced with J(0, 1, ""), if the respective type of value label
does not exist.

Source code

Distributed with the elabel package.

Author

Daniel Klein

University of Kassel

klein.daniel.81@gmail.com

Also see

Online: mata

if installed: elabel