Hi,
Sorry for the simple question. Is there a way to change the name of only one
column of an existing data frame?
I know colnames allows you to set the name of all the columns, but only one
column in the middle of my data frame needs a new name.
Thanks,
-Nina
__
> x <- data.frame(a=1,b=2,c=3)
> x
a b c
1 1 2 3
> colnames(x)[2] <- "done"
> x
a done c
1 12 3
>
On Tue, Jul 1, 2008 at 3:17 PM, <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Sorry for the simple question. Is there a way to change the name of only one
> column of an existing data frame?
>
> I kn
08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Subject: [R] Change name of a specific column of a data frame
To: R-help@r-project.org
Date: Tuesday, July 1, 2008, 2:17 PM
Hi,
Sorry for the simple question. Is there a way to change the name of onl
3 matches
Mail list logo