CategoryCounts
- To: mathgroup at smc.vnet.net
- Subject: [mg61403] CategoryCounts
- From: Gregory Lypny <gregory.lypny at videotron.ca>
- Date: Tue, 18 Oct 2005 02:44:49 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello Everyone, I'm having trouble with the bivariate form of CategoryCounts. I have an 1000 x 11 array named h1 whose 9th and 11th columns contain the month and year, such as h1[[All, {9,11}]={{October, 1999}, {October, 1999}, {October, 1999}, {August, 1999}, {August, 1999},...} Picking off months is no problem because CategoryCounts[h1[[All, 9]], {"October", "July", "August"}] correctly gives me {38, 752, 210}. And picking off years is also no problem because CategoryCounts[h1[[All, 11]], {1999, 2000, 2001, 2002, 2003}] correctly gives me {1000, 0, 0, 0, 0} (the first 1,000 observations all occurred in 1999). But picking off months and years does not give me the 3 x 5 array that I expect: CategoryCounts[h1[[All, {9,11}]], {{"October", "July", "August"}, {1999, 2000, 2001, 2002, 2003}}] yields {0, 0}. What am I doing wrong? Any advice would be most appreciated. Greg
- Follow-Ups:
- Re: CategoryCounts
- From: "Carl K. Woll" <carl@woll2woll.com>
- Re: CategoryCounts