tokens <- matrix(c(0, 0, "0", 0, "?",
0, 0, "1", 0, 1,
0, 0, "1", 0, 1,
0, 0, "2", 0, 1,
1, 1, "-", "?", 0,
1, 1, "2", 1, "{01}"),
nrow = 6, ncol = 5, byrow = TRUE,
dimnames = list(
paste0("Taxon_", LETTERS[1:6]),
paste0("Char_", 1:5)))
dataset <- MatrixToPhyDat(tokens)
Hamming(dataset)
Run the code above in your browser using DataLab