Examples (RENAME VARIABLES command)

Renaming Multiple Variables

RENAME VARIABLES (MOHIRED=MOSTART) (YRHIRED=YRSTART).
  • MOHIRED is renamed to MOSTART and YRHIRED to YRSTART. The parentheses are optional.
    RENAME VARIABLES (MOHIRED YRHIRED=MOSTART YRSTART).
  • The same name changes are specified as in the previous example. The parentheses are required, since variable lists are used.

Exchanging Variable Names

RENAME VARIABLES (A=B) (B=A).
  • Variable names are exchanged between two variables: A is renamed to B, and B is renamed to A.