is_prob_matrix | R Documentation |
Is object a transition probability matrix?
is_prob_matrix(probs, dp = 5)
probs |
matrix of transition probabilities |
dp |
Decimal places; Tolerance for equivalence |
logical
## Not run: probs <- matrix(c(1,0,0,1), nrow = 2) is_prob_matrix(probs) probs <- matrix(c(2,0,-1,1), nrow = 2) assert_that(is_prob_matrix(probs)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.