help elabel confirm

Title

elabel confirm -- Argument verification

Syntax

elabel confirm
[ # [ uniq ] ]
[ new | used ]
lblname
lblname [ lblname ... ]
[ , exact ]

Description

elabel confirm verifies that the specified argumets are of the
claimed type and exits with error if they are not; see confirm.

elabel confirm lblname verifies that lblname exists, i.e.,
is defined and stored in memory. Option exact is usually not
needed. If value label name abbreviations are supported, lblname
may be abbreviated. If option exact is specified, lblname
may not be abbreviated.

elabel confirm new lblname verifies that lblname does not exist,
i.e., is not defined and stored in memory. For more than one lblname,
elabel confirm new lblname verifies that lblnames are unique. Note
that lblname is treated as new even if it is an unambiguous abbreviation
of an existing value label.

elabel confirm used lblname verifies that lblname is used by
(attached to) at least one variable in the dataset. lblname need
not be defined and stored in memory. Note that lblname is treated
as new even if it is an unambiguous abbreviation of an existing value
label.

elabel confirm # [ uniq ] [ used ] lblname
verifies that exactly # (unique [used]) lblnames are specified.

Examples

Load example dataset

. sysuse nlsw88

Confirm occlbl is an existing value label (which it is)

. elabel confirm lblname occlbl

Confirm that occ is a new label (which it is)

. elabel confirm new lblname occ

Confirm that occlbl is a new label (which it is not)

. elabel confirm new lblname occlbl

Author

Daniel Klein

University of Kassel

klein.daniel.81@gmail.com

Also see

Online: label, label language

if installed: elabel