rename the dataframe column in r code example
Example 1: r dataframe change column name
names(df)[1] <- paste("newName")
Example 2: r: rename a column
colnames(df)[which(names(df) == "columnName")] <- "newColumnName"
names(df)[1] <- paste("newName")
colnames(df)[which(names(df) == "columnName")] <- "newColumnName"