I try to run the following command
gen OK=1 if strpos( name, "one") >0 | strpos( name, "two") >0 | strpos( name, "three") >0 | .... | strpos( name, "fourhundred") >0 | strpos( name, "fourhundredone") >0
The goal is to keep only those with a OK value (I believe one could formulate this somehow as 'keep if strpos( name, "one") >0 ....' too but that's the same problem.
If there's a similar thread, I apologies.
0 Response to Splitting up gen OK=1 if ... into several expressions
Post a Comment