Skip to content
Prev 66346 / 398503 Next

Convert timeseries to transition matrix

The following, using table, seems to work:
[1] "b" "a" "a" "b" "b" "a" "a" "b" "b" "b"
a b
  a 2 2
  b 2 3


Hope this helps,
Giovanni Petris