Nothing
test_that("compute_exact_partition_function works", {
expect_error(
compute_exact_partition_function(3, -1),
"n_items must be a positive integer"
)
expect_error(
compute_exact_partition_function(3, 2.3),
"n_items must be a positive integer"
)
expect_error(
compute_exact_partition_function(3, 0),
"n_items must be a strictly positive number of length one"
)
expect_error(
compute_exact_partition_function(-2, 3),
"alpha must be a strictly positive number of length one"
)
expect_error(
compute_exact_partition_function(rnorm(2), 3),
"alpha must be a strictly positive number of length one"
)
expect_equal(
compute_exact_partition_function(alpha = 3, n_items = 10, metric = "cayley"),
13.0481794289176
)
expect_equal(
compute_exact_partition_function(alpha = 3, n_items = 10, metric = "hamming"),
12.4542713806513
)
expect_equal(
compute_exact_partition_function(alpha = 3, n_items = 10, metric = "kendall"),
9.69641008390133
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.