Description Usage Arguments Details Value
View source: R/transition-matrix-to-function.R
Take a character formula transition matrix and turn it into a function
1 | trans_mat_to_D_fxn(D_mat, K, n_pars)
|
D_mat |
a KxK matrix of character transitions. See details |
K |
number of states |
n_pars |
number of parameters |
This function dynamically creates a list of functions that turn the character transition formulas provided by the user in D_mat into K^2 functions which take in arguments X0, ..., XK-1), par1, par2, ..., parn_pars, N, and t and output the numeric transition rate of an individual currently in state i to move to state j.
a list of length K^2 where entry K(i-1) + j for i, j <= K is a function. See details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.