Re: [R] Counting with multiple criteria using data table

2017-06-21 Thread Jeff Newmiller
To be fair, the OP did provide brief snippets of data.table usage below the data dump indicating some level of effort, but posted it all in HTML (what you see we do not see), did not make the example reproducible (dput is great, and library calls really clear things up [1][2][3]), and this

Re: [R] Counting with multiple criteria using data table

2017-06-21 Thread David Winsemius
> On Jun 21, 2017, at 2:50 PM, Ek Esawi wrote: > > I have a data.table which is shown below. I want to count combinations of > columns on i and count on j with by. A few examples are given below the > table. > > > > I want to: > > all months to show on the output

Re: [R] Counting with multiple criteria using data table

2017-06-21 Thread Bert Gunter
Have you gone through any R tutorials? If not, why not? If so, maybe you need to spend some more time with them. It looks like you want us to do your work for you. We don't do this. See (and follow) the posting guide below for what we might do (we're volunteers, so no guarantees). Cheers, Bert

[R] Counting with multiple criteria using data table

2017-06-21 Thread Ek Esawi
I have a data.table which is shown below. I want to count combinations of columns on i and count on j with by. A few examples are given below the table. I want to: all months to show on the output including those that they have zero value I want the three statements combined in on if possible