#' Calculate the share of identical classifications between two individuals, choose if euclidean of match
#'
#' @param x is an object
#' @return y is the output
#' @export
classDist <- function(x,y, length_x = NA, euclidean = TRUE){
if(euclidean){
dist <- sqrt(sum((x-y)^2))
} else {
dist <- sum(x==y)/length_x
}
return(dist)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.