Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
If you want to rename the columns by name:
library(gcookbook)# For the data setnames(anthoming)# Print the names of the columnsnames"angle""expt""ctrl"(anthoming)[names(anthoming)=="ctrl"]<-c("Control")names(anthoming)[names(anthoming)=="expt"]<-c("Experimental")names(anthoming)"angle""Experimental""Control"
They can also be renamed by numeric position:
names(anthoming)[1]<-"Angle"names(anthoming)"Angle""Experimental""Control"