I have 5 samples in the matrix below (mydf
). The euclidean distance between centre to the samples is given by the Distance column. How can I form a relationship matrix between the pairwise combination of distance of samples (eg., A:A,A:B,A:C....E:E) intersecting the centre. So I need to calculate the euclidean distance from A to centre to A (A:A), then A to centre to B (A:B), and so on. For example, the distance from A to center to A is (0.03994220+0.03994220), then A to B is (0.03994220+0.03704120), and so on.
mydf
samples Distance
A 0.03994220
B 0.03704120
C 0.03580851
D 0.04404073
E 0.04350807