test_that("Anonymisation of number vectors works", {
x <- c(1,2,3,4,5)
anon_x <- anon_double(x)
expect_true(all(order(x)==order(anon_x)))
expect_true(length(x)==length(anon_x))
expect_equal(unname(sort(table(x))), unname(sort(table(anon_x))))
expect_true(is.numeric(anon_x))
expect_true(any(x!=anon_x))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.