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)
Run the code above in your browser using DataLab