Hi,
I was curious to know if there is a more recent equivalent for the "old" stata 7 command "for any". I am still using "for any" to loop "in parallel": for instance, replacing a list of name by another list of names, like in the following example:
for any A B C / any 1 2 3 : replace var=Y if var==X
which is going to run : var=1 if var=A, then replace var=2 if var=B ...
This command is fine but has several drawbacks (especially when your name containt X and Y): Do you have suggestion to do a similar routine with a more up-to-date line of command?
Thanks very much
Adrien
I was curious to know if there is a more recent equivalent for the "old" stata 7 command "for any". I am still using "for any" to loop "in parallel": for instance, replacing a list of name by another list of names, like in the following example:
for any A B C / any 1 2 3 : replace var=Y if var==X
which is going to run : var=1 if var=A, then replace var=2 if var=B ...
This command is fine but has several drawbacks (especially when your name containt X and Y): Do you have suggestion to do a similar routine with a more up-to-date line of command?
Thanks very much
Adrien
Comment