Basic Examples (4)
Bin some data based only on the first element of each list:
Bin a list of data based on the string length of each item:
Bin some data based on the total of each list:
Bin some data with some "auxiliary" data:
Scope (3)
Perform a 2-dimensional binning based on the value of the first element, and the string length of the last element:
Perform a 3-dimensional binning based on the value of the first element, the value of the middle element, and the length of the last element:
The lists do not need to have the same length, structure, or type, allowing to bin data with auxiliary data:
Applications (5)
Bin some data based on the number of unique letters in each string:
Bin complex numbers based on their imaginary and real parts:
Bin some strings based on their first letter:
Bin some person entities based on their birth century:
Bin some associations based on age:
Properties and Relations (2)
BinLists can sometimes perform similar tasks as BinListsBy by giving a single large bin in the "other" dimensions:
GatherBy gives similar output as BinListsBy, but BinListsBy always returns an output with the same dimensions, the bins are sorted, and includes empty lists where necessary:
Explicitly check they return the same:
Possible Issues (2)
If the function does not return a number it will not be binned:
Values outside the binning range are discarded:
Neat Examples (2)
Bin some datasets based on their regressed slope:
Plot the datasets with similar slopes together: