test_that("counting times in partition intervals", {
t <- c(0.1, 1.1, 1.2, 2)
p1 <- c(0, 1, 2)
p2 <- c(0, 0.5, 1, 1.5, 2)
expect_identical(
partition_count(t, p1),
c(1, 3)
)
expect_identical(
partition_count(t, p2),
c(1, 0, 2, 1)
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.