1 @c PSPP - a program for statistical analysis.
2 @c Copyright (C) 2017 Free Software Foundation, Inc.
3 @c Permission is granted to copy, distribute and/or modify this document
4 @c under the terms of the GNU Free Documentation License, Version 1.3
5 @c or any later version published by the Free Software Foundation;
6 @c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
7 @c A copy of the license is included in the section entitled "GNU
8 @c Free Documentation License".
10 @node Variable Attributes
11 @chapter Manipulating variables
13 The variables in the active dataset dictionary are important. There are
14 several utility functions for examining and adjusting them.
17 * ADD VALUE LABELS:: Add value labels to variables.
18 * DELETE VARIABLES:: Delete variables.
19 * DISPLAY:: Display information about the active dataset.
20 * FORMATS:: Set print and write formats.
21 * LEAVE:: Don't clear variables between cases.
22 * MISSING VALUES:: Set missing values for variables.
23 * MODIFY VARS:: Rename, reorder, and drop variables.
24 * MRSETS:: Add, modify, and list multiple response sets.
25 * NUMERIC:: Create new numeric variables.
26 * PRINT FORMATS:: Set variable print formats.
27 * RENAME VARIABLES:: Rename variables.
28 * SORT VARIABLES:: Reorder variables.
29 * VALUE LABELS:: Set value labels for variables.
30 * STRING:: Create new string variables.
31 * VARIABLE ATTRIBUTE:: Set custom attributes on variables.
32 * VARIABLE LABELS:: Set variable labels for variables.
33 * VARIABLE ALIGNMENT:: Set the alignment for display.
34 * VARIABLE WIDTH:: Set the display width.
35 * VARIABLE LEVEL:: Set the measurement level.
36 * VARIABLE ROLE:: Set the role that a variable fills in analysis.
37 * VECTOR:: Declare an array of variables.
38 * WRITE FORMATS:: Set variable write formats.
41 @node ADD VALUE LABELS
42 @section ADD VALUE LABELS
43 @vindex ADD VALUE LABELS
47 /@var{var_list} @var{value} '@var{label}' [@var{value} '@var{label}']@dots{}
50 @cmd{ADD VALUE LABELS} has the same syntax and purpose as @cmd{VALUE
51 LABELS} (@pxref{VALUE LABELS}), but it does not clear value
52 labels from the variables before adding the ones specified.
54 @node DELETE VARIABLES
55 @section DELETE VARIABLES
56 @vindex DELETE VARIABLES
59 DELETE VARIABLES @var{var_list}.
62 @cmd{DELETE VARIABLES} deletes the specified variables from the
63 dictionary. It may not be used to delete all variables from the
64 dictionary; use @cmd{NEW FILE} to do that (@pxref{NEW FILE}).
66 @cmd{DELETE VARIABLES} should not be used after defining transformations
67 but before executing a procedure. If it is used in such a context, it
68 causes the data to be read. If it is used while @cmd{TEMPORARY} is in
69 effect, it causes the temporary transformations to become permanent.
76 DISPLAY [SORTED] NAMES [[/VARIABLES=]@var{var_list}].
77 DISPLAY [SORTED] INDEX [[/VARIABLES=]@var{var_list}].
78 DISPLAY [SORTED] LABELS [[/VARIABLES=]@var{var_list}].
79 DISPLAY [SORTED] VARIABLES [[/VARIABLES=]@var{var_list}].
80 DISPLAY [SORTED] DICTIONARY [[/VARIABLES=]@var{var_list}].
81 DISPLAY [SORTED] SCRATCH [[/VARIABLES=]@var{var_list}].
82 DISPLAY [SORTED] ATTRIBUTES [[/VARIABLES=]@var{var_list}].
83 DISPLAY [SORTED] @@ATTRIBUTES [[/VARIABLES=]@var{var_list}].
84 DISPLAY [SORTED] VECTORS.
87 @cmd{DISPLAY} displays information about the active dataset. A variety
88 of different forms of information can be requested.
90 The following keywords primarily cause information about variables to
91 be displayed. With these keywords, by default information is
92 displayed about all variable in the active dataset, in the order that
93 variables occur in the active dataset dictionary. The @subcmd{SORTED} keyword
94 causes output to be sorted alphabetically by variable name. The
95 @subcmd{VARIABLES} subcommand limits output to the specified variables.
99 The variables' names are displayed.
102 The variables' names are displayed along with a value describing their
103 position within the active dataset dictionary.
106 Variable names, positions, and variable labels are displayed.
109 Variable names, positions, print and write formats, and missing values
113 Variable names, positions, print and write formats, missing values,
114 variable labels, and value labels are displayed.
117 Variable names are displayed, for scratch variables only (@pxref{Scratch
122 Datafile and variable attributes are displayed.
123 The first form of the command omits those attributes
124 whose names begin with @code{@@} or @code{$@@}.
125 In the second for, all datafile and variable attributes are displayed.
128 With the @code{VECTOR} keyword, @cmd{DISPLAY} lists all the currently
129 declared vectors. If the @subcmd{SORTED} keyword is given, the vectors are
130 listed in alphabetical order; otherwise, they are listed in textual
131 order of definition within the @pspp{} syntax file.
133 For related commands, see @ref{DISPLAY DOCUMENTS} and @ref{DISPLAY
141 FORMATS @var{var_list} (@var{fmt_spec}) [@var{var_list} (@var{fmt_spec})]@dots{}.
144 @cmd{FORMATS} set both print and write formats for the specified
145 variables to the specified format specification.
146 @xref{Input and Output Formats}.
148 Specify a list of variables followed by a format specification in
149 parentheses. The print and write formats of the specified variables
150 will be changed. All of the variables listed together must have
151 the same type and, for string variables, the same width.
153 Additional lists of variables and formats may be included following
156 @cmd{FORMATS} takes effect immediately. It is not affected by
157 conditional and looping structures such as @cmd{DO IF} or @cmd{LOOP}.
164 LEAVE @var{var_list}.
167 @cmd{LEAVE} prevents the specified variables from being
168 reinitialized whenever a new case is processed.
170 Normally, when a data file is processed, every variable in the active
171 dataset is initialized to the system-missing value or spaces at the
172 beginning of processing for each case. When a variable has been
173 specified on @cmd{LEAVE}, this is not the case. Instead, that variable is
174 initialized to 0 (not system-missing) or spaces for the first case.
175 After that, it retains its value between cases.
177 This becomes useful for counters. For instance, in the example below
178 the variable @code{SUM} maintains a running total of the values in the @code{ITEM}
183 COMPUTE SUM=SUM+ITEM.
194 @noindent Partial output from this example:
203 It is best to use @cmd{LEAVE} command immediately before invoking a
204 procedure command, because the left status of variables is reset by
205 certain transformations---for instance, @cmd{COMPUTE} and @cmd{IF}.
206 Left status is also reset by all procedure invocations.
209 @section MISSING VALUES
210 @vindex MISSING VALUES
213 MISSING VALUES @var{var_list} (@var{missing_values}).
215 where @var{missing_values} takes one of the following forms:
217 @var{num1}, @var{num2}
218 @var{num1}, @var{num2}, @var{num3}
219 @var{num1} THRU @var{num2}
220 @var{num1} THRU @var{num2}, @var{num3}
222 @var{string1}, @var{string2}
223 @var{string1}, @var{string2}, @var{string3}
224 As part of a range, @subcmd{LO} or @subcmd{LOWEST} may take the place of @var{num1};
225 @subcmd{HI} or @subcmd{HIGHEST} may take the place of @var{num2}.
228 @cmd{MISSING VALUES} sets user-missing values for numeric and string
229 variables. Long string variables may have missing values, but
230 characters after the first 8 bytes of the missing value must be
233 Specify a list of variables, followed by a list of their user-missing
234 values in parentheses. Up to three discrete values may be given, or,
235 for numeric variables only, a range of values optionally accompanied by
236 a single discrete value. Ranges may be open-ended on one end, indicated
237 through the use of the
238 keyword @subcmd{LO} or @subcmd{LOWEST} or @subcmd{HI} or @subcmd{HIGHEST}.
240 The @cmd{MISSING VALUES} command takes effect immediately. It is not
241 affected by conditional and looping constructs such as @cmd{DO IF} or
250 /REORDER=@{FORWARD,BACKWARD@} @{POSITIONAL,ALPHA@} (@var{var_list})@dots{}
251 /RENAME=(@var{old_names}=@var{new_names})@dots{}
252 /@{DROP,KEEP@}=@var{var_list}
256 @cmd{MODIFY VARS} reorders, renames, and deletes variables in the
259 At least one subcommand must be specified, and no subcommand may be
260 specified more than once. @subcmd{DROP} and @subcmd{KEEP} may not both
263 The @subcmd{REORDER} subcommand changes the order of variables in the active
264 dataset. Specify one or more lists of variable names in parentheses. By
265 default, each list of variables is rearranged into the specified order.
266 To put the variables into the reverse of the specified order, put
267 keyword @subcmd{BACKWARD} before the parentheses. To put them into alphabetical
268 order in the dictionary, specify keyword @subcmd{ALPHA} before the parentheses.
269 @subcmd{BACKWARD} and @subcmd{ALPHA} may also be combined.
271 To rename variables in the active dataset, specify @subcmd{RENAME}, an equals sign
272 (@samp{=}), and lists of the old variable names and new variable names
273 separated by another equals sign within parentheses. There must be the
274 same number of old and new variable names. Each old variable is renamed to
275 the corresponding new variable name. Multiple parenthesized groups of
276 variables may be specified.
278 The @subcmd{DROP} subcommand deletes a specified list of variables
279 from the active dataset. @cmd{MODIFY VARS} may not be used to delete
280 all variables from the dictionary; use @cmd{NEW FILE} to do that
283 The @subcmd{KEEP} subcommand keeps the specified list of variables in the active
284 dataset. Any unlisted variables are deleted from the active dataset.
286 @subcmd{MAP} is currently ignored.
288 If either @subcmd{DROP} or @subcmd{KEEP} is specified, the data is read;
291 @cmd{MODIFY VARS} may not be specified following @cmd{TEMPORARY}
300 /MDGROUP NAME=@var{name} VARIABLES=@var{var_list} VALUE=@var{value}
301 [CATEGORYLABELS=@{VARLABELS,COUNTEDVALUES@}]
302 [@{LABEL='@var{label}',LABELSOURCE=VARLABEL@}]
304 /MCGROUP NAME=@var{name} VARIABLES=@var{var_list} [LABEL='@var{label}']
306 /DELETE NAME=@{[@var{names}],ALL@}
308 /DISPLAY NAME=@{[@var{names}],ALL@}
311 @cmd{MRSETS} creates, modifies, deletes, and displays multiple
312 response sets. A multiple response set is a set of variables that
313 represent multiple responses to a single survey question in one of the
318 A @dfn{multiple dichotomy set} is analogous to a survey question with
319 a set of checkboxes. Each variable in the set is treated in a Boolean
320 fashion: one value (the "counted value") means that the box was
321 checked, and any other value means that it was not.
324 A @dfn{multiple category set} represents a survey question where the
325 respondent is instructed to list up to @var{n} choices. Each variable
326 represents one of the responses.
329 Any number of subcommands may be specified in any order.
331 The @subcmd{MDGROUP} subcommand creates a new multiple dichotomy set or
332 replaces an existing multiple response set. The @subcmd{NAME},
333 @subcmd{VARIABLES}, and
334 @subcmd{VALUE} specifications are required. The others are optional:
338 @var{NAME} specifies the name used in syntax for the new multiple dichotomy
339 set. The name must begin with @samp{$}; it must otherwise follow the
340 rules for identifiers (@pxref{Tokens}).
343 @subcmd{VARIABLES} specifies the variables that belong to the set. At least
344 two variables must be specified. The variables must be all string or
348 @subcmd{VALUE} specifies the counted value. If the variables are numeric, the
349 value must be an integer. If the variables are strings, then the
350 value must be a string that is no longer than the shortest of the
351 variables in the set (ignoring trailing spaces).
354 @subcmd{CATEGORYLABELS} optionally specifies the source of the labels for each
359 @subcmd{VARLABELS}, the default, uses variable labels or, for variables without
360 variable labels, variable names. @pspp{} warns if two variables have the
361 same variable label, since these categories cannot be distinguished in
365 @subcmd{COUNTEDVALUES} instead uses each variable's value label for the counted
366 value. @pspp{} warns if two variables have the same value label for the
367 counted value or if one of the variables lacks a value label, since
368 such categories cannot be distinguished in output.
372 @subcmd{LABEL} optionally specifies a label for the multiple response set. If
373 neither @subcmd{LABEL} nor @subcmd{LABELSOURCE=VARLABEL} is specified, the set is
377 @subcmd{LABELSOURCE=VARLABEL} draws the multiple response set's label from the
378 first variable label among the variables in the set; if none of the
379 variables has a label, the name of the first variable is used.
380 @subcmd{LABELSOURCE=VARLABEL} must be used with @subcmd{CATEGORYLABELS=COUNTEDVALUES}.
381 It is mutually exclusive with @subcmd{LABEL}.
384 The @subcmd{MCGROUP} subcommand creates a new multiple category set or
385 replaces an existing multiple response set. The @subcmd{NAME} and @subcmd{VARIABLES}
386 specifications are required, and @subcmd{LABEL} is optional. Their meanings
387 are as described above in @subcmd{MDGROUP}. @pspp{} warns if two variables in the
388 set have different value labels for a single value, since each of the
389 variables in the set should have the same possible categories.
391 The @subcmd{DELETE} subcommand deletes multiple response groups. A list of
392 groups may be named within a set of required square brackets, or ALL
393 may be used to delete all groups.
395 The @subcmd{DISPLAY} subcommand displays information about defined multiple
396 response sets. Its syntax is the same as the @subcmd{DELETE} subcommand.
398 Multiple response sets are saved to and read from system files by,
399 e.g., the @cmd{SAVE} and @cmd{GET} command. Otherwise, multiple
400 response sets are currently used only by third party software.
407 NUMERIC @var{var_list} [(@var{fmt_spec})] [/@var{var_list} [(@var{fmt_spec})]]@dots{}
410 @cmd{NUMERIC} explicitly declares new numeric variables, optionally
411 setting their output formats.
413 Specify the names of the new numeric variables as @var{var_list}. If
414 you wish to set the variables' output formats, follow their names by
415 an output format specification in parentheses (@pxref{Input and Output
416 Formats}); otherwise, the default is F8.2.
418 Variables created with @cmd{NUMERIC} are initialized to the
419 system-missing value.
422 @section PRINT FORMATS
423 @vindex PRINT FORMATS
426 PRINT FORMATS @var{var_list} (@var{fmt_spec}) [@var{var_list} (@var{fmt_spec})]@dots{}.
429 @cmd{PRINT FORMATS} sets the print formats for the specified
430 variables to the specified format specification.
432 Its syntax is identical to that of @cmd{FORMATS} (@pxref{FORMATS}),
433 but @cmd{PRINT FORMATS} sets only print formats, not write formats.
435 @node RENAME VARIABLES
436 @section RENAME VARIABLES
437 @vindex RENAME VARIABLES
440 RENAME VARIABLES (@var{old_names}=@var{new_names})@dots{} .
443 @cmd{RENAME VARIABLES} changes the names of variables in the active
444 dataset. Specify lists of the old variable names and new
445 variable names, separated by an equals sign (@samp{=}), within
446 parentheses. There must be the same number of old and new variable
447 names. Each old variable is renamed to the corresponding new variable
448 name. Multiple parenthesized groups of variables may be specified.
449 When the old and new variable names contain only a single variable name,
450 the parentheses are optional.
452 @cmd{RENAME VARIABLES} takes effect immediately. It does not cause the data
455 @cmd{RENAME VARIABLES} may not be specified following @cmd{TEMPORARY}
459 @section SORT VARIABLES
460 @vindex SORT VARIABLES
464 (NAME | TYPE | FORMAT | LABEL | VALUES | MISSING | MEASURE
465 | ROLE | COLUMNS | ALIGNMENT | ATTRIBUTE @var{name})
469 @cmd{SORT VARIABLES} reorders the variables in the active dataset.
470 The main specification is one of the following identifiers, which
471 determines how the variables are sorted:
475 Sorts the variables according to their names, in a case-insensitive
476 fashion. However, when variable names differ only in a number at the
477 end, they are sorted numerically. For example, @code{VAR5} is sorted
478 before @code{VAR400} even though @samp{4} precedes @samp{5}.
481 Sorts numeric variables before string variables, and shorter string
482 variables before longer ones.
485 Groups variables by print format; within a format, sorts narrower
486 formats before wider ones; with the same format and width, sorts fewer
487 decimal places before more decimal places.
491 Sorts variables without a variable label before those with one.
492 @xref{VARIABLE LABELS}.
495 Sorts variables without value labels before those with some.
499 Sorts variables without missing values before those with some.
500 @xref{MISSING VALUES}.
503 Sorts nominal variables first, followed by ordinal variables, followed
504 by scale variables. @xref{VARIABLE LEVEL}.
507 Groups variables according to their role. @xref{VARIABLE ROLE}.
510 Sorts variables in ascending display width. @xref{VARIABLE WIDTH}.
513 Sorts variables according to their alignment, first left-aligned, then
514 right-aligned, then centered. @xref{VARIABLE ALIGNMENT}.
516 @item ATTRIBUTE @var{name}
517 Sorts variables according to the first value of their @var{name}
518 attribute. Variables without attribute are sorted first.
519 @xref{VARIABLE ATTRIBUTE}.
522 Only one sort criterion can be specified. The sort is ``stable,'' so
523 to sort on multiple criteria one may perform multiple sorts. For
524 example, the following will sort primarily based on alignment, with
525 variables that have the same alignment ordered based on display width:
528 SORT VARIABLES BY COLUMNS.
529 SORT VARIABLES BY ALIGNMENT.
532 Specify @code{(D)} to reverse the sort order.
535 @section VALUE LABELS
540 /@var{var_list} @var{value} '@var{label}' [@var{value} '@var{label}']@dots{}
543 @cmd{VALUE LABELS} allows values of
544 variables to be associated with labels. In this way, a short value can
545 stand for a longer, more descriptive label.
547 Both numeric and string variables can be given labels. For string
548 variables, the values are case-sensitive, so that, for example, a
549 capitalized value and its lowercase variant would have to be labeled
550 separately if both are present in the data.
552 To set up value labels for one or more variables, specify the
553 variable names after a slash (@samp{/}), followed by a list of values
554 and their associated labels, separated by spaces.
556 Value labels in output are normally broken into lines automatically.
557 Put @samp{\n} in a label string to force a line break at that point.
558 The label may still be broken into lines at additional points.
560 Before @cmd{VALUE LABELS} is executed, any existing value labels
561 are cleared from the variables specified. Use @cmd{ADD VALUE LABELS}
562 (@pxref{ADD VALUE LABELS}) to add value labels without clearing those
570 STRING @var{var_list} (@var{fmt_spec}) [/@var{var_list} (@var{fmt_spec})] [@dots{}].
573 @cmd{STRING} creates new string variables for use in
576 Specify a list of names for the variable you want to create,
577 followed by the desired output format specification in
578 parentheses (@pxref{Input and Output Formats}).
580 implicitly derived from the specified output formats.
581 The created variables will be initialized to spaces.
583 If you want to create several variables with distinct
584 output formats, you can either use two or more separate @cmd{STRING} commands,
585 or you can specify further variable list and format specification pairs, each separated
586 from the previous by a slash (@samp{/}).
588 The following example is one way to create three string variables; Two of the
589 variables have format A24 and the other A80:
591 STRING firstname lastname (A24) / address (A80).
594 @noindent Here is another way to achieve the same result:
596 STRING firstname lastname (A24).
597 STRING address (A80).
600 @noindent @dots{} and here is yet another way:
603 STRING firstname (A24).
604 STRING lastname (A24).
605 STRING address (A80).
611 @node VARIABLE ATTRIBUTE
612 @section VARIABLE ATTRIBUTE
613 @vindex VARIABLE ATTRIBUTE
617 VARIABLES=@var{var_list}
618 ATTRIBUTE=@var{name}('@var{value}') [@var{name}('@var{value}')]@dots{}
619 ATTRIBUTE=@var{name}@b{[}@var{index}@b{]}('@var{value}') [@var{name}@b{[}@var{index}@b{]}('@var{value}')]@dots{}
620 DELETE=@var{name} [@var{name}]@dots{}
621 DELETE=@var{name}@b{[}@var{index}@b{]} [@var{name}@b{[}@var{index}@b{]}]@dots{}
624 @cmd{VARIABLE ATTRIBUTE} adds, modifies, or removes user-defined
625 attributes associated with variables in the active dataset. Custom
626 variable attributes are not interpreted by @pspp{}, but they are saved as
627 part of system files and may be used by other software that reads
630 The required @subcmd{VARIABLES} subcommand must come first. Specify the
631 variables to which the following @subcmd{ATTRIBUTE} or @subcmd{DELETE} subcommand
634 Use the @subcmd{ATTRIBUTE} subcommand to add or modify custom variable
635 attributes. Specify the name of the attribute as an identifier
636 (@pxref{Tokens}), followed by the desired value, in parentheses, as a
637 quoted string. The specified attributes are then added or modified in
638 the variables specified on @subcmd{VARIABLES}. Attribute names that begin with
639 @code{$} are reserved for @pspp{}'s internal use, and attribute names
640 that begin with @code{@@} or @code{$@@} are not displayed by most @pspp{}
641 commands that display other attributes. Other attribute names are not
644 Attributes may also be organized into arrays. To assign to an array
645 element, add an integer array index enclosed in square brackets
646 (@code{[} and @code{]}) between the attribute name and value. Array
647 indexes start at 1, not 0. An attribute array that has a single
648 element (number 1) is not distinguished from a non-array attribute.
650 Use the @subcmd{DELETE} subcommand to delete an attribute from the variable
651 specified on @subcmd{VARIABLES}. Specify an attribute name by itself to delete
652 an entire attribute, including all array elements for attribute
653 arrays. Specify an attribute name followed by an array index in
654 square brackets to delete a single element of an attribute array. In
655 the latter case, all the array elements numbered higher than the
656 deleted element are shifted down, filling the vacated position.
658 To associate custom attributes with the entire active dataset, instead of
659 with particular variables, use @cmd{DATAFILE ATTRIBUTE} (@pxref{DATAFILE ATTRIBUTE}) instead.
661 @cmd{VARIABLE ATTRIBUTE} takes effect immediately. It is not affected
662 by conditional and looping structures such as @cmd{DO IF} or
665 @node VARIABLE LABELS
666 @section VARIABLE LABELS
667 @vindex VARIABLE LABELS
671 @var{var_list} '@var{var_label}'
672 [ /@var{var_list} '@var{var_label}']
676 [ /@var{var_list} '@var{var_label}']
679 @cmd{VARIABLE LABELS} associates explanatory names
680 with variables. This name, called a @dfn{variable label}, is displayed by
681 statistical procedures.
683 To assign a variable label to a group of variables, specify a
684 list of variable names and the variable label as a string.
685 To assign different labels to different variables in the same command,
686 precede the subsequent variable list with a slash (@samp{/}).
689 @node VARIABLE ALIGNMENT
690 @section VARIABLE ALIGNMENT
691 @vindex VARIABLE ALIGNMENT
695 @var{var_list} ( LEFT | RIGHT | CENTER )
696 [ /@var{var_list} ( LEFT | RIGHT | CENTER ) ]
700 [ /@var{var_list} ( LEFT | RIGHT | CENTER ) ]
703 @cmd{VARIABLE ALIGNMENT} sets the alignment of variables for display editing
704 purposes. This only has effect for third party software. It does not affect
705 the display of variables in the @pspp{} output.
711 @section VARIABLE WIDTH
712 @vindex VARIABLE WIDTH
715 @var{var_list} (width)
716 [ /@var{var_list} (width) ]
720 [ /@var{var_list} (width) ]
723 @cmd{VARIABLE WIDTH} sets the column width of variables for display editing
724 purposes. This only affects third party software. It does not affect
725 the display of variables in the @pspp{} output.
729 @section VARIABLE LEVEL
730 @vindex VARIABLE LEVEL
733 @var{var_list} ( SCALE | NOMINAL | ORDINAL )
734 [ /@var{var_list} ( SCALE | NOMINAL | ORDINAL ) ]
738 [ /@var{var_list} ( SCALE | NOMINAL | ORDINAL ) ]
741 @cmd{VARIABLE LEVEL} sets the measurement level of variables.
742 Currently, this has no effect except for certain third party software.
746 @section VARIABLE ROLE
747 @vindex VARIABLE ROLE
750 /@var{role} @var{var_list}
751 [/@var{role} @var{var_list}]@dots{}
754 @cmd{VARIABLE ROLE} sets the intended role of a variable for use in
755 dialog boxes in graphical user interfaces. Each @var{role} specifies
756 one of the following roles for the variables that follow it:
760 An input variable, such as an independent variable.
763 An output variable, such as an dependent variable.
766 A variable used for input and output.
769 No role assigned. (This is a variable's default role.)
772 Used to break the data into groups for testing.
775 No meaning except for certain third party software. (This role's
776 meaning is unrelated to @cmd{SPLIT FILE}.)
779 The PSPPIRE GUI does not yet use variable roles as intended.
786 Two possible syntaxes:
787 VECTOR @var{vec_name}=@var{var_list}.
788 VECTOR @var{vec_name_list}(@var{count} [@var{format}]).
791 @cmd{VECTOR} allows a group of variables to be accessed as if they
792 were consecutive members of an array with a vector(index) notation.
794 To make a vector out of a set of existing variables, specify a name
795 for the vector followed by an equals sign (@samp{=}) and the variables
796 to put in the vector. The variables must be all numeric or all
797 string, and string variables must have the same width.
799 To make a vector and create variables at the same time, specify one or
800 more vector names followed by a count in parentheses. This will
801 create variables named @code{@var{vec}1} through
802 @code{@var{vec}@var{count}}. By default, the new variables are
803 numeric with format F8.2, but an alternate format may be specified
804 inside the parentheses before or after the count and separated from it
805 by white space or a comma. With a string format such as A8, the
806 variables will be string variables; with a numeric format, they will
807 be numeric. Variable names including the suffixes may not exceed 64
808 characters in length, and none of the variables may exist prior to
811 Vectors created with @cmd{VECTOR} disappear after any procedure or
812 procedure-like command is executed. The variables contained in the
813 vectors remain, unless they are scratch variables (@pxref{Scratch
816 Variables within a vector may be referenced in expressions using
817 @code{vector(index)} syntax.
820 @section WRITE FORMATS
821 @vindex WRITE FORMATS
824 WRITE FORMATS @var{var_list} (@var{fmt_spec}) [@var{var_list} (@var{fmt_spec})]@dots{}.
827 @cmd{WRITE FORMATS} sets the write formats for the specified variables
828 to the specified format specification. Its syntax is identical to
829 that of @cmd{FORMATS} (@pxref{FORMATS}), but @cmd{WRITE FORMATS} sets only
830 write formats, not print formats.