Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
The position of the elements in a list that are largest according to a given function
ResourceFunction["PositionLargestBy"][list,f] gives the position of the first element in list that has the largest value when f is applied to it. | |
ResourceFunction["PositionLargestBy"][list,f,n] gives the positions of n values that are largest. |
Find a position of the integer with the largest inverse:
In[1]:= |
Out[1]= |
Get a list of the four positions of largest inverses:
In[2]:= |
Out[2]= |
Retrieve data on moons in our solar system:
In[3]:= |
Out[3]= |
Find the positions of the two densest moons for each planet using UpTo:
In[4]:= |
Out[4]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License