So the purpose is to compare each ID with each other ID by taking distances.
Consider the following dataframe Df
ID AN AW
a white green
b black yellow
c purple gray
d white gray
In order to compare I need a combination looking like the following:
ID AN AW ID2 AN2 AW2
a white green b black yellow
a white green c purple gray
a white green d white gray
b black yellow c purple gray
b black yellow d white gray
c purple gray d white gray
Basically I am trying to achieve all combinations in order to take distances between the features belonging to each ID.
Here I really do not now how to begin. Any insight? Which tools from R I could use?