title: R library for discrete Markov chain simulation
body: <p>I am looking for something like the 'msm' package, but for discrete Markov chains. For example, if I had a transition matrix defined as such</p>
  <pre><code>Pi &lt;- matrix(c(1/3,1/3,1/3,
  0,2/3,1/6,
  2/3,0,1/2))
  </code></pre>
  <p>for states A,B,C. How can I simulate a Markov chain according to that transition matrix?</p>