Command Reference : Function Reference : Function Reference: W
  
 
@wunique
Remove duplicate words in a string list.
Syntax: @wunique(str_list)
str_list: string
Return: string
Returns str_list with duplicate elements removed from the list. This function is case-sensitive.
Examples
@wunique("fr1 fr2 fr1")
returns the string “fr1 fr2”. Note that this function is case-sensitive, such that
@wunique("a A b B c c")
returns the string “a A b B c”.
If ALPHA1 is an alpha series,
alpha a1 = @wunique(alpha1)
returns the unique string list values of ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
svector s1 = @wunique(svec1)
returns an svector containing the unique string lists for each element of SVEC1.
Cross-references
See also @wkeep, @wnotin, and @wunique.