Nothing
test_that("percentile_rank() works", {
x <- c(2, 2, 3, 1, 0, 1, 2, 2)
res <- percentile_rank(x)
exp <- c(0.0625, .25, .625, .9375)
names(exp) <- 0:3
exp <- exp[match(x, 0:3)]
expect_equal(res, exp)
res <- percentile_rank(7:1, c(1, 0, 2, 2, 3, 1, 1))
exp <- c(95, 90, 80, 60, 35, 15, 5) / 100
names(exp) <- 7:1
expect_equal(res, exp, tolerance = .0455)
})
test_that("percentile_rank_weighted() handles decimals [92]", {
x <- c(1, 3.120000000001, 3.120000000001, 4)
w <- 1:4
expect_error(percentile_rank(x, w), class = "dupeCheckError")
})
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.