Next: The SAVE
Command, Previous: The READ
and WRITE
Commands, Up: MATRIX [Contents][Index]
GET
CommandGET variable[(index[,index])] [/FILE={file | *}] [/VARIABLES=variable…] [/NAMES=variable] [/MISSING={ACCEPT | OMIT | number}] [/SYSMIS={OMIT | number}].
The READ
command reads numeric data from an SPSS system file,
SPSS/PC+ system file, or SPSS portable file into a matrix variable or
submatrix:
GET
. The variable need not already exist; if it does, it is
replaced. The variable will have as many columns as there are
variables specified on the VARIABLES
subcommand and as many
rows as there are cases in the input file.
GET
.
The submatrix must have as many columns as variables specified on
VARIABLES
and as many rows as cases in the input file.
Specify the name or handle of the file to be read on FILE
. Use
‘*’, or simply omit the FILE
subcommand, to read from the
active file. Reading from the active file is only permitted if it was
already defined outside MATRIX
.
List the variables to be read as columns in the matrix on the
VARIABLES
subcommand. The list can use TO
for
collections of variables or ALL
for all variables. If
VARIABLES
is omitted, all variables are read. Only numeric
variables may be read.
If a variable is named on NAMES
, then the names of the
variables read as data columns are stored in a string vector within
the given name, replacing any existing matrix variable with that name.
Variable names are truncated to 8 bytes.
The MISSING
and SYSMIS
subcommands control the treatment
of missing values in the input file. By default, any user- or
system-missing data in the variables being read from the input causes
an error that prevents GET
from executing. To accept missing
values, specify one of the following settings on MISSING
:
ACCEPT
Accept user-missing values with no change.
By default, system-missing values still yield an error. Use the
SYSMIS
subcommand to change this treatment:
OMIT
Skip any case that contains a system-missing value.
Recode the system-missing value to number.
OMIT
Skip any case that contains any user- or system-missing value.
Recode all user- and system-missing values to number.
The SYSMIS
subcommand has an effect only with
MISSING=ACCEPT
.
Next: The SAVE
Command, Previous: The READ
and WRITE
Commands, Up: MATRIX [Contents][Index]