calculate_transition_matrix right now remaps sts in-place aka. integer symbols get replaced by an another integer from 1:length(unique(sts)) if map_symbols=true. This was introduced in 28570fa .
This is not obvious from the function name alone, it should be clearly signalled by ! convention => separate out-of-place and in-place versions of calculate_transition_matrix.
Also, there should be the possibility to specify symbol_dictionary as a parameter, which should have a default value.
calculate_transition_matrix with no remapping at all can be a separate function with a new name: calculate_transition_matrix_no_remap
calculate_transition_matrix
right now remapssts
in-place aka. integer symbols get replaced by an another integer from1:length(unique(sts))
ifmap_symbols=true
. This was introduced in 28570fa .This is not obvious from the function name alone, it should be clearly signalled by
!
convention => separate out-of-place and in-place versions ofcalculate_transition_matrix
.Also, there should be the possibility to specify
symbol_dictionary
as a parameter, which should have a default value.calculate_transition_matrix
with no remapping at all can be a separate function with a new name:calculate_transition_matrix_no_remap