context("test-percentize")
test_that("percentize creates character vectors of expected precision", {
expect_equal(
percentize(c(0.98, 0.984, 0.987)), c("98%", "98%", "99%")
)
expect_equal(
percentize(c(0.98, 0.984, 0.9872), digits = 1), c("98%", "98.4%", "98.7%")
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.