Re: [R] Referencing factors through their equivalent numeric level

2012-05-02 Thread Kaushik Krishnan
That did it! Thanks very much Berend. On Wed, May 2, 2012 at 4:19 AM, Berend Hasselman wrote: > > On 02-05-2012, at 07:22, Kaushik Krishnan wrote: > >> Hey folks >> >> I'm sorry for bringing what must be a very simple question to R-help, >> but after some research I haven't been able to find a so

Re: [R] Referencing factors through their equivalent numeric level

2012-05-02 Thread Berend Hasselman
On 02-05-2012, at 07:22, Kaushik Krishnan wrote: > Hey folks > > I'm sorry for bringing what must be a very simple question to R-help, > but after some research I haven't been able to find a solution to my > problem. > > Suppose I create a simple factor: > [code] >> x<-c("A","B","B","C","A") >>

[R] Referencing factors through their equivalent numeric level

2012-05-02 Thread Kaushik Krishnan
Hey folks I'm sorry for bringing what must be a very simple question to R-help, but after some research I haven't been able to find a solution to my problem. Suppose I create a simple factor: [code] > x<-c("A","B","B","C","A") > x [1] "A" "B" "B" "C" "A" > x <- as.factor(x) > x [1] A B B C A Leve