I need to convert a numerical series into a string in order to find the unique values in the series. Later in the progam I still need it to be a string.
Currently I use a simple loop to do the transformation:
Code: Select all
%codepays_all =""
for !i = 1 to @obs(codepays)
%codepays_all = %codepays_all +" "+@str(codepays(!i))
next
string codepays_all = %codepays_all
%codepays_unique = @wunique(codepays_all)
string codepays_unique = %codepays_unique
Now my question is, is there a faster way to perform this transformation? Ideally I could convert the series codepays into an svector or alpha and from there on use @wjoin to convert it into a string (such that I can use @wunique).
Kind regards,
michel
