context("rdirichlet")
test_that("rdirichlet returns vector of probabilities", {
expect_equal(sum(rdirichlet(c(1,1,1))), 1)
expect_equal(length(rdirichlet(c(1,1,1,1,1))), 5)
expect_equal(sum(is.na(rdirichlet(c(1+0.000001,0.000001,0.0000001)))), 0)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.