help elabel variable

Title

elabel variable -- Label variables

Syntax

Basic syntax

elabel variable
varname [ "label"
[ varname [ "label"
[ ... ] ] ] ]

Extended syntax

elabel variable
(varlist)
(lblspec)

elabel variable
varlist
=
fcn(arguments)
[ , options ]

where lblspec is one of
"label" [ "label" ... ], or,
=eexp

fcn() is an
elabel (pseudo-)function and
arguments are function specific

Description

elabel variable attaches variable labels to variables, removes variable
labels from variables, and modifies variable labels attached to variables.

In the basic syntax, omit the rightmost label to remove any variable
label from the rightmost variable. In general, specify "" as a
label to remove a variable label.

In the second (first extended) syntax, specify as many labels as there
are variables in varlist; the mapping of labels to varlist is
one-to-one. If only one label is specified, this label is attached
to all variables in varlist; this is useful for removing variable
labels from variables.

In the second (first extended) syntax, specify an eexp to modify
variable labels. In eexp, the @ character is replaced with the
variable label that is currently attached to the respective variable in
varlist. The # character may not be specified.

In the third (second extended) syntax, you specify an
elabel (pseudo-)function
to manipulate variable labels. See
elabel (pseudo-)functions
for a list of available (pseudo-)functions.

In the extended syntax, you cannot repeat variable names.

Examples

Load example dataset

. sysuse nlsw88

Change variable labels for age and tenure

. elabel variable age "Age" tenure "Job tenure (in years)"

Do the same as above

. elabel variable (age tenure) ("Age" "Job tenure (in years)")

Remove variable labels from all variables

. elabel variable (_all) ("")

Author

Daniel Klein

University of Kassel

klein.daniel.81@gmail.com

Also see

Online: label

if installed: elabel