Converts an encoding to a data frame.
encoding2df(x, sort = FALSE)
x | encoding. |
---|---|
sort | if |
data frame with two columns. First column represents an index of a group in the supplied encoding and the second column contains all elements of the encoding.
The encoding is a list of groups to which elements of an alphabet should be reduced. All elements of the alphabet (all amino acids or all nucleotides) should appear in the encoding.
calc_ed
: calculate the encoding distance between two encodings.
encoding2df
: converts an encoding to a data frame.
validate_encoding
: validate a structure of an encoding.
#> [[1]] #> [1] "l" "m" #> #> [[2]] #> [1] "a" "i" "v" #> #> [[3]] #> [1] "d" "h" "n" #> #> [[4]] #> [1] "c" "f" "p" "w" "y" #> #> [[5]] #> [1] "e" "g" "k" "q" "r" "s" "t" #>