Re: Counting Categories
- To: mathgroup at smc.vnet.net
- Subject: [mg96839] Re: Counting Categories
- From: Raffy <raffy at mac.com>
- Date: Thu, 26 Feb 2009 07:52:39 -0500 (EST)
- References: <go31gb$f8r$1@smc.vnet.net>
You need to be more specific about your data structure, ie. post an example. It sounds to me like you have a list of observations? Where each observation is a {color, size} pair? vColor = {red, blue, green}; vSize = {small, medium, large}; mObs = Transpose[RandomChoice[#, 100] & /@ {vColor, vSize}]; In[118]:= mObs // Tally Out[118]= {{{blue, large}, 14}, {{green, small}, 15}, {{blue, medium}, 13}, {{red, medium}, 7}, {{blue, small}, 9}, {{red, large}, 12}, {{green, large}, 11}, {{green, medium}, 9}, {{red, small}, 10}}