powered by
Calculates the transition matrix by counting occurrences of tuples in given vector list
sequences2transmatrix(sequences)
A list object containing
Transition Matrix with row names and column names are the associated score/state
a vector containing the score/state, ordered in the same way as the matrix columns and rows
Sequences to be analyzed, can be a list of vectors, or a vector
In output, score_value is coerced as integer if possible. Else, it is a character vector containing the states of the Markov chain.
myseq <- sample(LETTERS[1:2], size=20,replace=TRUE) sequences2transmatrix(myseq)
Run the code above in your browser using DataLab