A convenience function used to arrange vectorised matrix samples into the correct matrix format for several functions used to specify Markov model. See example_two_state_markov for an example use case. Implemented using R.

matrix_arrange_inner(samples)

Arguments

samples

A list of vectorised matrix samples

Value

A list of matrices with each matrix representing a single sample.

Examples

matrix_samples <- list(VGAM::rdiric(1:5, c(88, 12)), VGAM::rdiric(1:5, c(8, 92))) matrix_arrange_inner(matrix_samples)
#> [[1]] #> [,1] [,2] #> [1,] 0.9013829 0.09861706 #> [2,] 0.1091828 0.89081717 #> #> [[2]] #> [,1] [,2] #> [1,] 0.87380662 0.1261934 #> [2,] 0.05764665 0.9423533 #> #> [[3]] #> [,1] [,2] #> [1,] 0.85258600 0.1474140 #> [2,] 0.06684033 0.9331597 #> #> [[4]] #> [,1] [,2] #> [1,] 0.9079913 0.09200872 #> [2,] 0.1276325 0.87236746 #> #> [[5]] #> [,1] [,2] #> [1,] 0.90296031 0.09703969 #> [2,] 0.07465485 0.92534515 #>