Recoding variables in a data frame

I think we need to see more of your code and some sample data.