help for lrasvar

Label or Rename Varlist as the Contents of the Specified Variable

lrasvar labelling or renaming varlist as the contents of the specified variable in turn.

Syntax

lrasvar [varlist] , as(varname) [ force rename both trim drop ]

Where if the varlist is not specified, it means all string varlist in the database.

as(varname) specifies the variable whose contents Assigned to varlist as labels (or names) in turn.

force is optional, runs the command when the number of varlist is more than obs of the specified variable.

rename is optional, olny renames varlist as contents of as(varname) in turn. The default is only to label varlist.

both is optional, both renames and labels varlist as contents of as(varname) in turn; not allowed with option rename.

trim is optional, trims leading or trailing spaces of variable in as(varname), and collapses consecutive internal spaces to one.

drop is optional, drop the variable in option as(varname).

Examples

. lrasvar, as(new)

. lrasvar var*, as(new)

. lrasvar var*, as(new) force

. lrasvar var*, as(new) rename

. lrasvar var*, as(new) both

. lrasvar var*, as(new) both trim

. lrasvar var*, as(new) drop

Authors

Dejin Xie, School of Economics and Management, Nanchang University, China.

E-mail: xiedejin@ncu.edu.cn.

Also see

Help: label; labone, nrow2 (if they are installed).