https://github.com/Excel-R-tutorials/Markov_Extensions