how to change column names in r

160

how to change column names in r -

colnames(dataset) <- c('name1','name2',..)

r - change column name -

colnames(df)[colnames(df) == "name"] <- "new_name"

Comments

Submit
0 Comments