I have been trying to compute Jaccard similarity index for all possible duo combinations for 7 communities and to create a matrix, or preferably Cluster plotting with the similarity index.
There are 21 combinations like Community1 vs Community2, Community1 vs Control and Control vs Community2 etc...
Data is like below:
Communities AllM AllP AnBr ArHe ArFi ArXa AsGo
Community1 1 1 1 0 0 0 1
Community2 1 0 1 0 0 0 1
Community3 1 1 1 0 0 1 1
Community4 1 1 1 0 0 0 0
Community5 1 1 1 0 0 1 0
Community6 1 1 1 0 0 0 0
Control 1 0 1 0 0 0 1
Each rows represent different communities and the columns show species in the communities. 1 is presence of the species in the community, 0 is absence of the species in the community
My main goal is to create a Cluster plot using similarity index and I want to show which community is most similar with the control community in terms of species composition and which one is very different etc. How can I compute Jaccard similarity index for all possible duo combinations and create a matrix? or it would be great to create cluster plot to show similarity using this data in R, which is my preferred way of doing that. I am not sure the data is formatted correctly for the analysis.
or you can recommend best software and tools to do that easily.
Thanks