[R] changing colnames in dataframes

2008-12-03 Thread Wolfgang Lindner
dear all, I'm building new dataframes from bigger one's using e.g. columns F76, F83, F90: JJ<-data.frame( c( as.character(rep( gender,3))) , c( F76,6- F83, F90) ) Looking into JJ one has: c.as.character.rep.gender..8... c.6...F73..F78..F79..F82..6...F84..F94..F106..F109 1

Re: [R] changing colnames in dataframes

2008-12-03 Thread Prof Brian Ripley
See the help page. You name the arguments, e.g. JJ <- data.frame( gender= c( as.character(rep( gender,3))) , J.value -c( F76 ,6-F83, F90) ) The help says Arguments: ...: these arguments are of either the form 'value' or 'tag = value'. Component names are crea

Re: [R] changing colnames in dataframes

2008-12-04 Thread Wolfgang Lindner
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(