Re: [R] Renaming levels of a factor in a dataframe

2011-08-15 Thread Petr PIKAL
Hi > > Here's an example of relevel used to relevel and combine groups > > InsectSprays2<-InsectSprays > levels(InsectSprays2$spray) > levels(InsectSprays2$spray)<-list(new1=c("A","C"),YEPS=c("B","D","E"),LASTLY="F") > levels(InsectSprays2$spray) > InsectSprays2 > > So for you try... > leve

Re: [R] Renaming levels of a factor in a dataframe

2011-08-14 Thread Tyler Rinker
Here's an example of relevel used to relevel and combine groups InsectSprays2<-InsectSprays levels(InsectSprays2$spray) levels(InsectSprays2$spray)<-list(new1=c("A","C"),YEPS=c("B","D","E"),LASTLY="F") levels(InsectSprays2$spray) InsectSprays2 So for you try... levels (Data1$Site) <- list(F