Markov Chain Model In R