Let's say I have 3 variables: freq_fight freq_run freq_drink, which contain values 0, 1, 2, 3. I want to create binary 0/1 versions of each of those variables and also have the new binary variables replace 'freq' with 'binary' in the variable name. I could do this very clunkily, but is there a way to do this all in one loop?
-
Login or Register
- Log in with
Comment