Description Usage Arguments Value Examples
View source: R/matrix_arrange.R
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. Both a R and C++ implementation are available.
1 | matrix_arrange(samples, type = "rcpp")
|
samples |
A list of vectorised matrix samples |
type |
A character string specifying the approach to use. Currently implemented approaches are "base", and "rcpp" with "rcpp" as the default. |
A list of matrices with each matrix representing a single sample.
1 2 3 4 5 6 7 8 9 | matrix_samples <- list(VGAM::rdiric(1:5, c(88, 12)),
VGAM::rdiric(1:5, c(8, 92)))
# Default usage
matrix_arrange(matrix_samples)
# R implementation
matrix_arrange(matrix_samples, type = "base")
# Rcpp implementation
matrix_arrange(matrix_samples, type = "rcpp")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.