Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Combine multiple tally results
ResourceFunction["MetaTally"][{t1,t2,…}] combines the counts of multiple tally results ti. | |
ResourceFunction["MetaTally"][{t1,t2,…},f] applies f to the list of counts of each given element, where by default these lists are totaled. |
MetaTally combines multiple tallies:
| In[1]:= |
| Out[1]= |
Analogous to the Tally of the combined lists:
| In[2]:= |
| Out[2]= |
Allowing work with intermediate tallies:
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
The argument lists are compared on their first elements:
| In[6]:= | ![]() |
| Out[6]= |
The aggregation is performed on the rest of the elements:
| In[7]:= | ![]() |
| Out[7]= |
The function for aggregation can be specified:
| In[8]:= | ![]() |
| Out[8]= |
| In[9]:= | ![]() |
| Out[9]= |
The default aggregation function is Total:
| In[10]:= | ![]() |
| Out[10]= |
| In[11]:= | ![]() |
| Out[11]= |
This work is licensed under a Creative Commons Attribution 4.0 International License