In the below I want to create a new variable new_code which groups all the codes in the 45 series....
I have shown it for some on the extreme right of the table..
Would something as below work?
I don't follow the logic for the new_code variable. What drives whether the value is kept with the new value versus whether the new value is missing?