tokens <- matrix(c(
0, 0, 0, 1, 1, 2,
0, 0, 0, 0, 0, 0), byrow = TRUE, nrow = 2L,
dimnames = list(letters[1:2], NULL))
pd <- TreeTools::MatrixToPhyDat(tokens)
morphyObj <- PhyDat2Morphy(pd)
MorphyWeights(morphyObj)
if (SetMorphyWeights(c(1, 1.5, 2/3), morphyObj) != 0L) message("Errored")
MorphyWeights(morphyObj)
morphyObj <- UnloadMorphy(morphyObj)
Run the code above in your browser using DataLab