convert_names: convert_names

View source: R/get_transition_matrix.R

convert_namesR Documentation

convert_names

Description

convert_names

Usage

convert_names(new_row, new_col, transition_matrix)

Arguments

new_row

Vector with the new row names to assign to transition_matrix

new_col

Vector with the new column names to assign to transition_matrix

transition_matrix

Output from get_transition_matrix.

Value

A matrix with row names equal to new_row and column names equal to new_col.

Author(s)

Gabriele Lubatti gabriele.lubatti@helmholtz-muenchen.de

Examples

transition_1 <- matrix(1, ncol = 2, nrow = 2)
colnames(transition_1) <- c("Stage1", "Stage2")
row.names(transition_1) <- c("Stage1", "Stage2")
col_name_new <- c("Stage1_new", "Stage2_new")
row_name_new <- c("Stage1_new", "Stage2_new")
transition_1 <- convert_names(row_name_new, col_name_new, transition_1)



WOTPLY documentation built on Sept. 12, 2022, 9:05 a.m.