Learn R Programming

pammtools (version 0.7.3)

from_to_pairs: Extract transition information from different objects

Description

Extract transition information from different objects

Usage

from_to_pairs(t_mat, ...)

from_to_pairs2(t_mat, ...)

# S3 method for data.frame from_to_pairs(t_mat, from_col = "from", to_col = "to", ...)

Arguments

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.

Examples

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab