Recoding variables

Can you provide the code that you're working with and a subset of the data that is causing your problem as a reproducible example?