Solution

ID: past-exam-of-the-probability-statistics-and-options-i-course-of-the-university-of-oxford/2010/u/1/a/solution

R fills matrices columnwise by default. Specifying rowwise filling gives the requested order:
A <- matrix(c(1/3, 2/3, 0,
              1/4, 1/2, 1/4,
              0,   1/4, 3/4), nrow = 3, byrow = TRUE)
The result is a transition matrix, with nonnegative entries and every row summing to one.

New to topics? Read the docs here!