test_that("calculate percentiles: 1", {
df <- tibble(x = c(2, 4, 6, 8), y = c(8, 6, 2, 4), z = c(1, 1, 1, 1))
r <- df[3,]
expect_equal(calculatePercentiles(r, df) %>% as.numeric(), c(0.75, 0.25, 1))
r <- df[4, 1:2]
expect_equal(calculatePercentiles(r, df) %>% as.numeric(), c(1, 0.5))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.