create an average distance matrix based on matching prefix column and row names in R
I want to create a new distance matrix from an array of hundreds of distance matrices. This new matrix will be the average distances given a set of pairwise distances. The values to be averaged is based matching name prefixes. Easier to illustrate as my language might be incorrect: Here’s one sample distance matrix: