Re: Extract values and multilpicities from list
- To: mathgroup at smc.vnet.net
- Subject: [mg64876] Re: Extract values and multilpicities from list
- From: "dkr" <dkrjeg at adelphia.net>
- Date: Mon, 6 Mar 2006 05:01:34 -0500 (EST)
- References: <due96k$ach$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In[5]:= fun[x_List]:=Reap[Sow[1,x],_,{#1,Length[#2]}&][[2]]//Sort; In[6]:= lstIn={2,3,4,4,2,1,1,5,4}; In[7]:= fun[lstIn] Out[7]= {{1,2},{2,2},{3,1},{4,3},{5,1}} dkr