replace column names r code example
Example 1: r dataframe change column name
names(df)[1] <- paste("newName")
Example 2: r set dataframe column names
R> colnames(X)[2] <- "superduper"
names(df)[1] <- paste("newName")
R> colnames(X)[2] <- "superduper"