Skip to content

11 Manipulating Variables ​

Every value in a dataset is associated with a variable. Variables describe what the values represent and properties of those values, such as the format in which they should be displayed, whether they are numeric or alphabetic and how missing values should be represented. There are several utility commands for examining and adjusting variables.

• DISPLAYDisplay information about the active dataset.
• NUMERICCreate new numeric variables.
• STRINGCreate new string variables.
• RENAME VARIABLESRename variables.
• SORT VARIABLESReorder variables.
• DELETE VARIABLESDelete variables.
• VARIABLE LABELSSet variable labels for variables.
• PRINT FORMATSSet variable print formats.
• WRITE FORMATSSet variable write formats.
• FORMATSSet print and write formats.
• VALUE LABELSSet value labels for variables.
• ADD VALUE LABELSAdd value labels to variables.
• MISSING VALUESSet missing values for variables.
• VARIABLE ATTRIBUTESet custom attributes on variables.
• VARIABLE ALIGNMENTSet the alignment for display.
• VARIABLE WIDTHSet the display width.
• VARIABLE LEVELSet the measurement level.
• VARIABLE ROLESet the role that a variable fills in analysis.
• VECTORDeclare an array of variables.
• MRSETSAdd, modify, and list multiple response sets.
• LEAVEDon’t clear variables between cases.

基于 GNU PSPP 2.0.1 手册与入门教程整理