sabrelogo

Sabre

READ

Sabre manual

Syntax: READ [filename]
where filename is an optional argument defining the name of a file in which the data is stored.

Purpose:
The READ command reads data values into the variables defined by a previous DATA command. The data values are read in free format, with numbers within a single row of the data matrix separated by spaces or newlines. Each new row of the data matrix needs to begin on a new line, but this is the only restriction.

The data matrix needs to be presented to SABRE in a standard order, as follows:

OBSERVATION 1 CASE 1
OBSERVATION 2 CASE 1
...
...
OBSERVATION N1 CASE 1
OBSERVATION 1 CASE 2
OBSERVATION 2 CASE 2
...
...
OBSERVATION N2 CASE 2
OBSERVATION 1 CASE 3
etc.

One of the variables in the data matrix should normally be a variable which identifies the case number of the observation: this is taken to be the first variable in the data list unless explicitly defined through the use of the CASE command.

If no filename is specified, then data values are read starting on the line following the READ command, until a command is found on a new line. If filename is specified, then data values are read from the named file until the end of the file is reached.

If the number of data values read is an exact multiple of the number of variables, then the data is defined as having been read correctly.

Note that in Windows, unless the data file is located in the same directory as the SABRE executable, then full path names must be supplied.

Sabre manual

Go to: Sabre home page | Sabre manual | Downloading & Installing Sabre | Sabre examples | Training materials | Sabre mailing list | Contact us

Other links: Centre for e-Science | Centre for Applied Statistics