#5 individuals represented by their relative frequencies of 4 characteristics (M1-M4):
f <- matrix(c(0.36, 0.21, 0.23, 0.20,
0.66, 0.18, 0.11, 0.05,
0.01, 0.24, 0.62, 0.13,
0.43, 0.38, 0.08, 0.11,
0.16, 0.07, 0.09, 0.68),
byrow=TRUE, nrow=5, dimnames=list(1:5, paste("M", 1:4, sep="")))
# Bhattacharyya distances between pairs
d <- dbhatta(f)
Run the code above in your browser using DataLab