View source: R/long_xx_transmat.R
long_to_transmat | R Documentation |
Long format to transition matrix
long_to_transmat(dat, val_col = "prob")
dat |
array of from, to, prob, vals |
val_col |
Name of value column; default prob (string) |
Transition matrix
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.