
Last chance! 50% off unlimited learning
Sale ends in
computes for binary data some distance matrice.
dist.binary(df, method = NULL, diag = FALSE, upper = FALSE)
a matrix or a data frame with positive or null numeric values. Used with as.matrix(1 * (df > 0))
an integer between 1 and 10 . If NULL the choice is made with a console message. See details
a logical value indicating whether the diagonal of the distance matrix should be printed by `print.dist'
a logical value indicating whether the upper triangle of the distance matrix should be printed by `print.dist'
returns a distance matrix of class dist
between the rows of the data frame
Let be the contingency table of binary data such as
S3 coefficient of Gower & Legendre
S4 coefficient of Gower & Legendre
S5 coefficient of Gower & Legendre
S6 coefficient of Gower & Legendre
S7 coefficient of Gower & Legendre
S9 index of Gower & Legendre (1986)
S12 coefficient of Gower & Legendre
S13 coefficient of Gower & Legendre
S14 coefficient of Gower & Legendre
Gower, J.C. and Legendre, P. (1986) Metric and Euclidean properties of dissimilarity coefficients. Journal of Classification, 3, 5--48.
# NOT RUN {
data(aviurba)
for (i in 1:10) {
d <- dist.binary(aviurba$fau, method = i)
cat(attr(d, "method"), is.euclid(d), "\n")}
# }
Run the code above in your browser using DataLab