powered by
Change the columns names of a data frame and stores the original column names
change_names(data)
A list of length two:
1. a data frame with the original column names and the corresponding new names
2. a data frame with the changed column names
data.frame, A data frame
# original data frame with 5 columns data <- data.frame(matrix(1:20, nrow = 4, ncol = 5)) change_names(data)
Run the code above in your browser using DataLab