Rename — Rename variable
Title
rename -- Rename variable
Syntax Menu Description Remarks and examples References Also see
Syntax
rename old varname new varname
Menu
Data > Data utilities > Rename groups of variables
Description
rename changes the name of existing variable old varname to new varname; the contents of the variable are unchanged. Also see [D] rename group for renaming groups of variables.
Remarks and examples
Example 1
rename allows you to change variable names. Say that we have labor market data for siblings.
. use
. describe
Contains data from
obs:
277
vars:
6
9 Jan 2013 11:57
size:
6,648
storage display variable name type format
value label
variable label
famid edu exp promo sex inc
float %9.0g
float %9.0g
float %9.0g
float %9.0g
float %9.0g
sex
float %9.0g
Sorted by: famid
1
2 rename -- Rename variable
We decide to rename the exp and inc variables.
. rename exp experience
. rename inc income
. describe
Contains data from
obs:
277
vars:
6
9 Jan 2013 11:57
size:
6,648
storage display variable name type format
value label
variable label
famid
float %9.0g
edu
float %9.0g
experience
float %9.0g
promo
float %9.0g
sex
float %9.0g
sex
income
float %9.0g
Sorted by: famid Note: dataset has changed since last saved
The exp variable is now called experience, and the inc variable is now called income.
References
Cox, N. J., and J. Weesie. 2001. dm88: Renaming variables, multiply and systematically. Stata Technical Bulletin 60: 4?6. Reprinted in Stata Technical Bulletin Reprints, vol. 10, pp. 41?44. College Station, TX: Stata Press. . 2005. Software Updates: Renaming variables, multiply and systematically. Stata Journal 5: 607.
Jenkins, S. P., and N. J. Cox. 2001. dm83: Renaming variables: Changing suffixes. Stata Technical Bulletin 59: 5?6. Reprinted in Stata Technical Bulletin Reprints, vol. 10, pp. 34?35. College Station, TX: Stata Press.
Also see
[D] rename group -- Rename groups of variables [D] generate -- Create or change contents of variable [D] varmanage -- Manage variable labels, formats, and other properties
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- encode — encode string into numeric and vice versa
- 044 29 the very valuable variable value functions
- 059 30 a clever demonstration of the sas substr function
- destring — convert string variables to numeric variables
- resolving and using var i macro variables
- commodore 64 programmers reference manual
- name tejas p hello tejas p r in t i n p 9 basic 256
- working with strings stata
- rename — rename variable
- split — split string variables into parts
Related searches
- rename columns pandas
- how to rename user account windows 10
- rename column dataframe
- python rename index column
- rename a column in python
- independent variable dependent variable constant
- dependent variable and independent variable example
- sas rename variable data step
- rename variable in r
- rename variable in r studio
- how to rename a variable in r
- rename a factor variable in r