Variables come in two basic types, viz: numeric and string. Variables such as age, height and satisfaction are numeric, whereas name is a string variable. String variables are best reserved for commentary data to assist the human observer. However they can also be used for nominal or categorical data.
data-list defines two variables forename and height, and reads data into them by manual input.
PSPP> data list list /forename (A12) height. PSPP> begin data. data> Ahmed 188 data> Bertram 167 data> Catherine 134.231 data> David 109.1 data> end data PSPP>
Example 5.1: Manual entry of data using the
DATA LIST command.
forename and height are defined and subsequently filled
with manually entered data.
There are several things to note about this example.
DATA LISTcommand. See DATA LIST. It tells pspp to prepare for reading data. The word ‘list’ intentionally appears twice. The first occurrence is part of the
DATA LISTcall, whilst the second tells pspp that the data is to be read as free format data with one record per line.