I currently face issues transforming the matrix to the format below. How do I achieve this in R in the easiest way? Ideally, I would like to use the second matrix as a data frame. Many thanks in advance!
Estonia Germany Poland
Estonia 0 2 3
Germany 2 0 4
Poland 3 4 0
Country1 Country2 Weight
Estonia Estonia 0
Estonia Germany 2
Estonia Poland 3
Germany Estonia 2
...