RandIndex <- function(x, y){
n <- length(x)
adjx <- AdjacencyMatrix(x)
adjy <- AdjacencyMatrix(y)
diff <- adjx - adjy
disgree <- length(diff[diff==1])
RD <- 1 - disgree/(n*(n-1))
return(round(RD, 2))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.