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 2 Vol 1

UNIQUE

Name:
    UNIQUE (LET)
Type:
    Let Subcommand
Purpose:
    Compute the number of distinct values in a variable.
Description:
    This command is the equivalent of

      LET YD = DISTINCT Y
      LET ND = SIZE YD

    However, in some cases you may just need the number of distinct values, not the values themselves. This is the case where the UNIQUE command is useful.

Syntax:
    LET <par> = UNIQUE <y>             <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the number of distinct values is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET NBATCH = UNIQUE BATCH
Note:
    Dataplot statistics can be used in a number of commands. For details, enter

    The UNIQUE command is not typically used in the context of these other commands.

Default:
    None
Synonyms:
    None
Related Commands:
    SIZE = Compute the number of elements in a variable.
    DISTINCT = Extract the distinct values from a variable.
Applications:
    Data Management
Implementation Date:
    2011/7
Program:
     
    SKIP 25
    READ GEAR.DAT Y X
    LET ND = UNIQUE X
    XLIMITS 1 ND
    MAJOR XTIC MARK NUMBER ND
    MINOR XTIC MARK NUMBER 0
    TIC MARK OFFSET UNITS DATA
    XTIC MARK OFFSET 0.5 0.5
    Y1LABEL Mean
    X1LABEL Batch
    LABEL CASE ASIS
    MEAN PLOT Y X
        
    plot generated by sample program

Date created: 07/22/2011
Last updated: 07/22/2011
Please email comments on this WWW page to alan.heckert@nist.gov.