Re: [R] counting with factors

2007-11-02 Thread Marc Schwartz
On Fri, 2007-11-02 at 12:01 -0400, Bernd Jagla wrote: > Hi there, > I have something that appears to be a factor called drug: > > Typeof(drug) => Integer This is because the underlying data type of a factor is an integer. > As.numeric(drug) gives a long list This gives you the integer storage

[R] counting with factors

2007-11-02 Thread Bernd Jagla
Hi there, I have something that appears to be a factor called drug: Typeof(drug) => Integer As.numeric(drug) gives a long list Levels(drug) gives a long list, too. Now I want something like the summary function does: I want to count how often each level occurs in the given vector. My p