Answers for "how to change the column name in a dataframe in r"

R
1

rename column in r

# df = dataframe
# old.var.name = The name you don't like anymore
# new.var.name = The name you want to get

names(df)[names(df) == 'old.var.name'] <- 'new.var.name'
Posted by: Guest on February-27-2020

Code answers related to "how to change the column name in a dataframe in r"

Browse Popular Code Answers by Language