27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RENAME VARIABLES<br />

RENAME VARIABLES {(varname=varname) [(varname ...)]}<br />

{(varnames=varnames) }<br />

Example<br />

RENAME VARIABLES (JOBCAT=TITLE).<br />

Overview<br />

RENAME VARIABLES changes the names of variables in the working data file while preserving<br />

their original order, values, variable labels, value labels, missing values, and print<br />

and write formats.<br />

Basic Specification<br />

• The basic specification is an old variable name, an equals sign, and the new variable<br />

name. The equals sign is required.<br />

<strong>Syntax</strong> Rules<br />

• Multiple sets of variable specifications are allowed. Each set can be enclosed in parentheses.<br />

• You can specify a list of old variable names followed by an equals sign and a list of new<br />

variable names. The same number of variables must be specified on both lists. A single<br />

set of parentheses enclosing the entire specification is required for this method.<br />

• Keyword TO can be used on the left side of the equals sign to refer to variables in the<br />

working data file, and on the right side of the equals sign to generate new variable names<br />

(see the TO keyword on p. 23).<br />

• Old variable names do not need to be specified according to their order in the working<br />

data file.<br />

• Name changes take place in one operation. Therefore, variable names can be exchanged<br />

between two variables (see the example on p. 1387).<br />

• Multiple RENAME VARIABLES commands are allowed.<br />

• RENAME VARIABLES cannot follow either a TEMPORARY or a MODEL PROGRAM<br />

command.<br />

1386

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!