Long format to transition matrix
Examples
dat <- data.frame(from = c(NA,1, 1),
to = c(1, 2, 3),
prob = c(NA, 0.5, 0.5),
vals = c(0, 1, 2))
long_to_transmat(dat)
#> 1 2 3
#> 1 NA 0.5 0.5
#> 2 NA NA NA
#> 3 NA NA NA