var1
a
a
a
a
a
b
a
a
a
b
a
... (there are several thousand of these)
I want to creat a unique number to identify each set from a-b. e.g.:
var1 var2
a 1
a 1
a 1
a 1
a 1
b 1
a 2
a 2
a 2
b 2
a3
...
I know how to use the _n command, but am unsure of how to employ it in this
case (i can do it in the opposite order). any help would be appreciated.