Based on https://community.jmp.com/t5/Discussions/Combinations-of-a-list-put-into-columns/m-p/555454
I have a list
list = {"A", "B", "C"}
I need based on that make a list of all pair combinations.
Link above helped me to get away from long cycles or joining tables into essentially a one-liner thanks to @brady_brady
I have this so far:
list = {"A", "B", "C"};
combinations = As List(N Choose K Matrix(N Items(list), 2));
What it does it gives me a list of lists of INDICES
{{1, 2}, {1, 3}, {2, 3}}
and what I need is list of pairs of strings:
{{"A", "B"},{"A", "C"},{"B", "C"}}
without going into cycles is there another one-liner that would do that?
Just indexing list with combinations gives me a flat list
list[combinations]
{"A", "B", "A", "C", "B", "C"}