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.

FLIP<br />

FLIP [[VARIABLES=] {ALL }]<br />

{varlist}<br />

[/NEWNAMES=variable]<br />

Example<br />

FLIP VARIABLES=WEEK1 TO WEEK52 /NEWNAMES=DEPT.<br />

Overview<br />

Options<br />

The program requires a file structure in which the variables are the columns and observations<br />

(cases) are the rows. If a file is organized such that variables are in rows and observations are<br />

in columns, you need to use FLIP to reorganize it. FLIP transposes the rows and columns of the<br />

data in the working data file so that, for example, row 1, column 2 becomes row 2, column 1,<br />

and so forth.<br />

Variable Subsets. You can transpose specific variables (columns) from the original file using<br />

the VARIABLES subcommand.<br />

Variable Names. You can use the values of one of the variables from the original file as the<br />

variable names in the new file, using the NEWNAMES subcommand.<br />

Basic Specification<br />

The basic specification is the command keyword FLIP, which transposes all rows and columns.<br />

• By default, FLIP assigns variable names VAR001 to VARn to the variables in the new file.<br />

It also creates the new variable CASE_LBL, whose values are the variable names that<br />

existed before transposition.<br />

Subcommand Order<br />

VARIABLES must precede NEWNAMES.<br />

Operations<br />

• FLIP replaces the working data file with the transposed file and displays a list of variable<br />

names in the transposed file.<br />

589

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

Saved successfully!

Ooh no, something went wrong!