# Make an unordered costmatrix:
costmatrix <- make_costmatrix(
min_state = 0,
max_state = 2,
character_type = "unordered"
)
# Convert costmatrix to stategraph:
stategraph <- convert_costmatrix_to_stategraph(costmatrix = costmatrix)
# Check that this is a valid costMatrix object:
is.stateGraph(x = stategraph)
Run the code above in your browser using DataLab