I would like to calculate the distance matrix of the rows in an array in R using Tanimoto/Jacquard Score as distance matrix.
Is it possible to be done? If yes, could you mind to teach me how to do it?
vegan
package has a vegdist
function that can calculate, among other things, the Jaccard index. Assuming that's what you're after. It's use is pretty straightforward.
library(vegan)
data(varespec)
vare.dist <- vegdist(varespec, method = "jaccard")
Other available methods are
method Dissimilarity index, partial match to "manhattan", "euclidean",
"canberra", "bray", "kulczynski", "jaccard", "gower", "altGower", "morisita",
"horn", "mountford", "raup" , "binomial" or "chao"
I think you're going to have a lot more luck searching for "Jaccard" rather than "Jacquard".
install.packages("sos")
)library(sos); findFn("tanimoto jaccard")
).install.packages("ade4"); library("ade4"); ?dist.binary
)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With