change column names R studion dataframe code example
Example 1: how to change column names in r
colnames(dataset) <- c('name1','name2',..)
Example 2: r set dataframe column names
R> colnames(X)[2] <- "superduper"
colnames(dataset) <- c('name1','name2',..)
R> colnames(X)[2] <- "superduper"