R - VariableID changes

I'm working on R, trying to get Census data such as Total households, marriages (same/opposite sex), etc. I noticed some of the variable IDs changes depending on the year. I can't find anywhere the reason behind it or how to navigate through this "issue". So far finding the variable ID for the different types of marriages/cohabiting has been the most challenging. Does any ones has any suggestions?