# Make a four-state ordered character stategraph:
ordered_costmatrix <- make_costmatrix(
min_state = "0",
max_state = "3",
character_type = "ordered"
)
ordered_stategraph <- convert_costmatrix_to_stategraph(costmatrix = ordered_costmatrix)
# Find length of shortest spanning tree of stategraph:
find_stategraph_minimum_span(stategraph = ordered_stategraph)
# Make a four-state unordered character stategraph:
unordered_costmatrix <- make_costmatrix(
min_state = "0",
max_state = "3",
character_type = "unordered"
)
unordered_stategraph <- convert_costmatrix_to_stategraph(costmatrix = unordered_costmatrix)
# Find length of shortest spanning tree of stategraph:
find_stategraph_minimum_span(stategraph = unordered_stategraph)
# Make a four-state irreversible character stategraph:
irreversible_costmatrix <- make_costmatrix(
min_state = "0",
max_state = "3",
character_type = "irreversible"
)
irreversible_stategraph <- convert_costmatrix_to_stategraph(costmatrix = irreversible_costmatrix)
# Find length of shortest spanning tree of stategraph:
find_stategraph_minimum_span(stategraph = irreversible_stategraph)
# Make a four-state Dollo character stategraph:
dollo_costmatrix <- make_costmatrix(
min_state = "0",
max_state = "3",
character_type = "dollo"
)
dollo_stategraph <- convert_costmatrix_to_stategraph(costmatrix = dollo_costmatrix)
# Find length of shortest spanning tree of stategraph:
find_stategraph_minimum_span(stategraph = dollo_stategraph)
Run the code above in your browser using DataLab