how to change col name in R code example Example: r - change column name colnames(df)[colnames(df) == "name"] <- "new_name"