I have a problem I'm not sure how to approach. I have a list of items in a matrix and I want to create a matrix that instead holds every possible combination of two of those items.
So say I have matrix_1 that looks Like this:
Matrix_1 <- as.matrix(a,b,c)
[,1]
A
B
C
From that I would like to Make A Matrix that looks as follows
[,1] [,2]
A A
A B
A C
B A
B B
B C
C A
C B
C C
How do I do that?