Re: [R] help: how to change the column name of data.frame

From: wu sz <>
Date: Tue 19 Jul 2005 - 20:42:14 EST

Thanks a lot! But DF[c(4,6)] <- DF[c(6,4)] seems to just exchange the data, not the names. If exchanging the columns(both data and names) needs two steps?

DF[c(4,6)] <- DF[c(6,4)]
names(DF)[c(4,6)] <- names(DF)[c(6,4)]

Shengzhe mailing list PLEASE do read the posting guide! Received on Tue Jul 19 20:47:42 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:46 EST