[R] data frame column name change
eric
ericstrom at aol.com
Mon Jan 17 05:28:21 CET 2011
How do I change the name of one column in a data frame ? Suppose I have a
data frame x with 5 columns. If the names were date, col1, col2, col3, col4
and I wanted to simply change the name of date, what would the command be ?
I tried the following and it didn't seem to work :
names(x[1]) <- "newname"
Thanks in advance for the comments
--
View this message in context: http://r.789695.n4.nabble.com/data-frame-column-name-change-tp3220684p3220684.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list