Computes the encoding distance between two encodings.
calc_ed(a, b, prop = NULL, measure)
a | encoding (see |
---|---|
b | encoding to which |
prop |
|
measure |
See the package vignette for more details. |
an encoding distance.
calc_si
: compute the similarity index of two encodings.
encoding2df
: converts an encoding to a data frame.
validate_encoding
: validate a structure of an encoding.
# calculate encoding distance between two encodings of amino acids aa1 = list(`1` = c("g", "a", "p", "v", "m", "l", "i"), `2` = c("k", "h"), `3` = c("d", "e"), `4` = c("f", "r", "w", "y", "s", "t", "c", "n", "q")) aa2 = list(`1` = c("g", "a", "p", "v", "m", "l", "q"), `2` = c("k", "h", "d", "e", "i"), `3` = c("f", "r", "w", "y", "s", "t", "c", "n")) calc_ed(aa1, aa2, measure = "pi")#> [1] 4# the encoding distance between two identical encodings is 0 calc_ed(aa1, aa1, measure = "pi")#> [1] 0