[R] changing colnames in dataframes

Wolfgang Lindner LindnerW at t-online.de
Thu Dec 4 06:27:44 CET 2008


thank you all, Jagat, Bert and Prof. Ripley for your kind help.

The PROBLEM was:

give descripitve names to the columns in
JJ<-data.frame( c( as.character(rep( gender,3))) , c( F76,6- F83, F90) )

Possible SOLUTIONs are:

1.    JJ <- data.frame( gender=c( as.character(rep( gender,3))) ,
J.value=c(F76,6- F83, F90) )

2.   names(JJ) <- c("gender","J.value")

Now I can continue my work being happy with R.

hth
Wolfgang



More information about the R-help mailing list