[R] Simple Coding problem ?

Michael M. Meyer mikem at salter-point.com
Sun Apr 21 18:10:14 CEST 2002

Let x be the sequence of numbers.

What about forming a table of x[-1] against x[-length(x)],
   table(x[-1], x[-length(x)])

That should give you the transition matrix from each state to each
other state.


Mike Meyer, Salter Point Associates, Seattle WA
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list