I'm trying to figure out how to create the table (Output) from a single column table below.
In R, the function pair.matrix does what I need https://www.rdocumentation.org/packages/cape/versions/2.0.2/topics/pair.matrix
How can I replicate this?
Input
Output
idname
idnameid2name21apple
1apple1apple2banana
1apple2banana3carrot
1apple3carrot
2banana1apple
2banana2banana
2banana3carrot
3carrot1apple
3carrot2banana
3carrot3carrot



Alternatively, the InlineQuerier (SQL), the PyhonCaller (Python scripting), the RCaller (R scripting), or the XMLXQueryExtractor (XQuery scripting) etc. could also be helpful.