Nothing
test_that("contrank", {
expectrank <- function(x) {
r <- rank(x, ties.method = "average")
cr <- contrank(x)
expect_equal(all(r-1 <= cr & cr <= r), TRUE)
}
expectrank(c(1,2,2))
expectrank(c(2,2,3))
for(n in c(1,2,3,4,5,6,10, 100)) {
expectrank(rnorm(n))
expectrank(sample(1:3, n, replace=TRUE))
}
})
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.