help mata Elabel_Dir()

Title

Elabel_Dir() -- Obtain lists of value label names
and languages (class)

Syntax

class Elabel_Dir scalar d

string colvector
d.rnames()

string colvector
d.attached()

string colvector
d.nonexistent()

string colvector
d.orphans()

string colvector
d.used()

string colvector
d.allnames()

string scalar
d.clang()

string colvector
d.langs([real scalar exclude])

(varies)
d.mlang([real scalar mlang])

void
d.resetnames()

Description

Elabel_Dir() returns instances of class Elabel_Dir;
Elabel_Dir() extends
Elabel_Utilities(). The
class is used for developing the elabel package. See
elabel_dir() and elabel_ldir()
for the corresponding Mata functions.

d.rnames() returns all value label names that are stored
in memory. The functions calls Stata's label dir.

d.attached() returns all value label names that are attached
to at least one variable in the dataset, including value label names that
are not stored in memory. Value label names in memory that are not attached
to any variables are omitted.

d.nonexistent() returns value label names that are not stored
in memory but attached to at least one variable in the dataset;
d.undefined() is a synonym for d.nonexistent().

d.orphans() returns value label names that are stored in memory
but not attached to any of the variables in the dataste;
d.notused() is a synonym for d.orphans().

d.used() returns value label names that are stored in memory and
attached to at least one variable in the dataset.

d.allnames() is a convenience function and returns
(d.attached()\ d.orphans()).

d.clang() returns the current label language; see
label language.

d.langs() returns a list of all label languages, excluding the
current label language. If exclude=0, the current label language is
included in the list of label languages.

d.mlang(), if mlang!=0 (the default), collects nonexistent
value label names from all label languages in
multilingual datasets; conversely, setting mlang=0
restricts those value label names to the current label language. Called
without arguments, the function returns the current setting of mlang.

d.resetnames() resets all results. The function must be called
after new value labels have been defined, value labels have been dropped,
or variables have been added or dropped from the dataset.

Conformability

As indicated above.

Diagnostics

Not documented; class functions are for internal use.

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