Question: how to change the name of variable in r?
Answer: If you want to rename a variable, and you don't know it's position, you can request the variable with that name. For example, this code will rename the variable x , and call it y . There is also a rename variables function, I think in the car package.