Re: [R] How to apply table() on subdata and stack outputs

2009-02-11 Thread jim holtman
This may be what you want: > table(input.df$id, input.df$var_interest) happy soso unhappy jack 0 21 1 tom 1 10 1 On Wed, Feb 11, 2009 at 1:34 PM, Sean Zhang wrote: > Dear R helpers: > > I am a R novice and have a question about using table() to extract

Re: [R] How to apply table() on subdata and stack outputs

2009-02-11 Thread Uwe Ligges
Sean Zhang wrote: Dear R helpers: I am a R novice and have a question about using table() to extract frequences over many sub-datasets. A small example input dataframe and wanted output dataframe are provided below. The real data is very large so a for loop is what I try to avoid. Can someone

[R] How to apply table() on subdata and stack outputs

2009-02-11 Thread Sean Zhang
Dear R helpers: I am a R novice and have a question about using table() to extract frequences over many sub-datasets. A small example input dataframe and wanted output dataframe are provided below. The real data is very large so a for loop is what I try to avoid. Can someone englithen me how to u