You can use names(database)[position] where position is the number of the column that you want to rename!
Leandro Marino -----Mensagem original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de [EMAIL PROTECTED] Enviada em: terca-feira, 1 de julho de 2008 16:18 Para: [email protected] Assunto: [R] Change name of a specific column of a data frame 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 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

