r df columns names code example
Example 1: how to change column names in r
colnames(dataset) <- c('name1','name2',..)
Example 2: r dataframe change column name
names(df)[1] <- paste("newName")
colnames(dataset) <- c('name1','name2',..)
names(df)[1] <- paste("newName")