Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Make a list from tallied results
ResourceFunction["Untally"][{{e1,c1},{e2,c2},…}] makes one long list with each ei appearing ci times, reversing the results of Tally. |
Make a list of items given by their multiplicity:
| In[1]:= |
| Out[1]= |
Reverse a tally:
| In[2]:= |
| Out[3]= |
Randomize the results:
| In[4]:= | ![]() |
| Out[5]= |
An untally with a RandomChoice, which uses the weights of the tally for randomly creating the elements:
| In[6]:= | ![]() |
| Out[7]= |
Using DeleteDuplicates is the same as applying DeleteDuplicates to the original data:
| In[8]:= | ![]() |
| Out[9]= |
The original order can not be reconstructed again:
| In[10]:= |
| Out[11]= |
This work is licensed under a Creative Commons Attribution 4.0 International License