Beginner Question: What is a simple way to rename a variable observation in a dataframe column?
I have dataframe "Stuff" with a column of categorical data called "Age" where one of the data variables is called "Age80+". I've learned that R does not like "+" in a name,
e.g. Age80+ <- brings up an error
In column "Age" there are 7 other variable numbers, e.g. "Age18_30" so I cannot manually change the observation names efficiently.
I have looked but I haven't found a simple way to rename all "Age80+" to "Age80plus" without bringing in complicated packages like "stringer" or "dplyr". The dataframe has 100's of "Age80+" observations.
Thank you
I have tried
Stuff$Age<- gsub("Age80+", "Age80plus", Stuff$Age)
But that changes "Age80+" to "Age80plus+" not "Age80plus"
The change leaves the "+"