Created
June 27, 2019 11:18
-
-
Save Harshit1694/e7f45054499e015ff75034958ff7d40c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Calculating the euclidean distance | |
ED<-function(data1,data2){ | |
distance=0 | |
for (i in (1:(length(data1)-1))){ | |
distance=distance+(data1[i]-data2[i])^2 | |
} | |
return(sqrt(distance)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment