>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  UNIQ_TAGVAL

UNIQ_TAGVAL

UNIQ_TAGVAL

Name


      UNIQ_TAGVAL

Purpose


      Reduce given tag and value lists to unique tags only.

Category


Calling Sequence


      uniq_tagval, tag, val, tag2, val2

Inputs


      tag = Text array of tag names. in
      val = Array of tag values. in

Keyword Parameters


Keywords


        /FIRST means use the first value found for each tag
          as the returned value.
        /LAST means use the last value found for each tag
          as the returned value. This is the default.
        INDEX=in Indices of the unique elements selected from tag.
        COUNT=n Number of elements in returned arrays.
        USED=uin Array giving the index of the element actually
          used for each element in the original tag array.

Outputs


      tag2 = Unique tag names. out
      val2 = Corresponding tag values. out

Common Blocks


Notes


      Note: May also call with just tag, tag2:
        uniq_tagval, tag, tag2
      if val is not needed. Keywords work the same.
      The tag array may have a tag repeated multiple times.
      The array val must be the same size, it can be any type.
      The returned array tag2 will have only the unique tags in
      the order first found in tag, val2 will have the
      corresponding values. For example:
        Inputs With /FIRST With /LAST
        tag val tag2 val2 tag2 val2
        --- --- ---- ---- ---- ----
          a 0.58 a 0.58 a 0.31
          b 0.42 b 0.42 b 0.31
          e 0.88 e 0.88 e 0.06
          f 0.47 f 0.47 f 0.47
          c 0.84 c 0.84 c 0.79
          b 0.01 d 0.27 d 0.27
          a 0.17
          d 0.27
          e 0.27
          b 0.49
          c 0.79
          a 0.31
          b 0.31
          e 0.06

Modification History


      R. Sterner, 2006 Dec 19
  Copyright (C) 2006, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us