SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Vol 2

READ SUBSET (SET)

Name:
    READ SUBSET (SET)
Type:
    Subcommand under SET
Purpose:
    Specify how SUBSET clauses are to be interpreted on READ commands.
Description:
    The SUBSET/EXCEPT/FOR clause on a READ command is ambiguous. The ambiguity aries from the fact that it is not clear whether the SUBSET/EXCEPT/CLAUSE command refers to the lines in the data file being read or to the output variables that are created by the READ command. We address this with the following command:

      SET READ SUBSET <PACK/DISPERSE> <PACK/DISPERSE>

    In this command, PACK means the SUBSET/EXCEPT/FOR clause does not apply while DISPERSE means that it does. The first setting applies to the input file while the second setting applies to the created data variables.

    This is demonstrated with the following example (note that P-D means the data file is set to PACK and the output variable is set to DISPERSE). The first column is the data in the file while the remaining columns show what the resulting data variable should look like.

      LET TAG = 1 FOR I = 1 1 10
      LET TAG = 0 FOR I = 2 2 10
      READ FILE.DAT X SUBSET TAG = 1

      X P-D P-P D-P D-D
      1 1 1 1 1
      2 0 2 3 0
      3 2 3 5 3
      4 0 4 7 0
      5 3 5 9 5
      6 0 6 - 0
      7 4 7 - 7
      8 0 8 - 0
      9 5 9 - 9
      10 - 10 - -

    The default setting is PACK-DISPERSE (this is the default because this is the behavior of previous versions of Dataplot). However, the DISPERSE-PACK option is the one most likely to be used. The PACK-PACK option is equivalent to not using the SUBSET clause at all, so is unlikely to be used.

Syntax:
    SET READ SUBSET <PACK/DISPERSE> <PACK/DISPERSE>
    where the first <PACK/DISPERSE> specifies how the SUBSET clause applies to the data file and second <PACK/DISPERSE> specifies how the output file is created.
Examples:
    SET READ SUBSET PACK DISPERSE
    SET READ SUBSET PACK PACK
    SET READ SUBSET DISPERSE PACK
    SET READ SUBSET DISPERSE DISPERSE
Note:
    This command works as documented for SUBSET clauses. It is not currently working correctly for FOR clauses.
Default:
    The default is SET READ SUBSET PACK DISPERSE.
Synonyms:
    None
Related Commands:
    READ = Carries out a column-wise input of data.
    COLUMN LIMITS = Specify what columns to read.
    SET READ MISSING VALUE = Specify the value used to denote a missing value.
    SET READ DELIMITER = Specify the character that will be interperted as a delimiter between fields on a data record.
Applications:
    Input/Output
Implementation Date:
    2004/10
Program:
     
    .  This example shows how to read every other line
    .  of the input file.
    .
    SKIP 25
    SET READ SUBSET DISPERSE PACK
    LET N = 107
    LET TAG = 1 FOR I = 1 1 N
    LET TAG = 0 FOR I = 2 2 N
    READ BERGER1.DAT  Y X  SUBSET TAG = 1
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 09/19/2012
Last updated: 11/04/2015

Please email comments on this WWW page to alan.heckert@nist.gov.