I have a pairwise matrix that I can consider an adjacency matrix of a graph. I am hoping to apply a transitive reduction algorithm to find the graph with the fewest edges but retains the connectivity of the original graph - see image below.
The head of my matrix looks like so:
EN_DavaW EN_DrumW CN_ShainW CN_Glasdrum 19-CCP
EN_DavaW 0.0000000000 2.286985e-03 0.014775598 0.013954988 -0.0149552822
EN_DrumW -0.0022869851 0.000000e+00 0.013133681 0.011270755 -0.0166146429
CN_ShainW -0.0147755985 -1.313368e-02 0.000000000 -0.001550990 -0.0244997421
CN_Glasdrum -0.0139549879 -1.127075e-02 0.001550990 0.000000000 -0.0328348644
19-CCP 0.0149552822 1.661464e-02 0.024499742 0.032834864 0.0000000000
In this matrix a positive integer can be visualised by an arrow from Pop 1 to Pop 2. Whereas a negative value the arrow would be from Pop 2 to Pop1.
I am struggling to find a package available for R version 4.02 that will carry this out on my matrix.
I have looked at the package nem, more specifically the function nem::transitive.reduction see here but it is not available for the version stated above. Even when installing through bioconductor
Are there any other packages or can I create my own function to carry out transitive reduction on a pairwise matrix?


