View source: R/multi-state-helpers.R
from_to_pairs | R Documentation |
Extract transition information from different objects
from_to_pairs(t_mat, ...)
from_to_pairs2(t_mat, ...)
## S3 method for class 'data.frame'
from_to_pairs(t_mat, from_col = "from", to_col = "to", ...)
t_mat |
an object that contains information about possible transitions. |
from_col |
The name of the column in the data frame that contains "from" states. |
to_col |
The name of the column in the data frame that contains "to" states. |
## Not run:
df = data.frame(id = c(1,1, 2,2), from = c(1, 1, 2, 2), to = c(2, 3, 2, 2))
from_to_pairs(df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.