from_to_pairs: Extract transition information from different objects

View source: R/multi-state-helpers.R

from_to_pairsR Documentation

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 class '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

## 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)

pammtools documentation built on April 3, 2025, 5:25 p.m.