Skip to content

Instantly share code, notes, and snippets.

@jvcasillas
Created April 11, 2015 22:43
Show Gist options
  • Save jvcasillas/c8290797ee157a59bd22 to your computer and use it in GitHub Desktop.
Save jvcasillas/c8290797ee157a59bd22 to your computer and use it in GitHub Desktop.
Euclidean distance
euc.dist <- function(x1, x2){
x <- sqrt(sum((x1 - x2)^2))
return(x)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment