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

2011-08-15 Thread Petr PIKAL
x.f [1] A A A y A x A x x y A A A A y A A A A A x A x A A y A A A A A x y y A A A [38] x A A x A A x y A x A y y x y A x y A A A x x A A A A A y A A A x A A x A [75] A A A A A A A y x x x y A y x x A A A A A x y A A x Levels: A x y > Regards Petr > > > > > Fr

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

2011-08-14 Thread Tyler Rinker
ys2$spray) InsectSprays2 So for you try... levels (Data1$Site) <- list(Fw =c( "AB"), Est = c("DE")) > From: deel...@hotmail.com > To: r-help@r-project.org > Date: Sun, 14 Aug 2011 12:56:25 -0300 > Subject: [R] Renaming levels of a factor in a dataframe > &g

[R] Renaming levels of a factor in a dataframe

2011-08-14 Thread B Jessop
Dear Helplist: I am trying, unsuccessfully, to rename levels of a factor in a dataframe. The dataframe consists of two factor variables and one numeric variable as follows: Factor Site has 2 levels AB and DE, factor Fish has 30 levels, 15 associated with each Site e.g. 1-1, 1-2,.2-1, 2