help mata elabel_rename()

Title

elabel_rename() -- Rename value label

Syntax

void
elabel_rename(string scalar oldlblname,
string scalar newlblname)

void
elabel_rename(oldlblname,
newlblname,
real scalar nomemold[,
real scalar nomemnew])

where oldlblname is a value label name, possibly with wildcard
characters *, ~, and ?.

newlblname is the name of a new, not yet defined, value label.

nomemold!=0 treats value labels that are not (yet) defined in
memory as existing in oldlblname; default is nomemold=0.

nomemnew!=0 treats value labels that are not (yet) defined in
memory as existing in newlblname; default is nomemnew=1.

Description

elabel_rename() changes the name of value label oldlblname to
newlblname.

Technically, elabel_rename() copies the contents of oldlblname
to newlblname, drops oldlblname from memory, and attaches
newlblname to all variables that previously had oldlblname
attached.

Conformability

elabel_rename(oldlblname, newlblname[, nomemold[, nomemnew]])
oldlblname: 1 x 1
newlblname: 1 x 1
nomemold: 1 x 1
nomemnew: 1 x 1

Diagnostics

elabel_rename() exits with Stata error messages if oldlblname is not
found, matches more than one value label name, or is otherwise invalid. It
also exits with error if newlblname is already defined or otherwise
invalid.

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