test_that("compute_ndd produces expected output", {
output1 <- compute_ndd(cprd, min, min)
mean <- mean(output1$ndd, na.rm = TRUE)
expect_equal(mean, 3.4285714286)
expect_equal(nrow(output1), 18L)
output2 <- compute_ndd(cprd, min, max)
mean <- mean(output2$ndd, na.rm = TRUE)
expect_equal(mean, 3.4285714286)
output3 <- compute_ndd(cprd, max, max)
mean <- mean(output3$ndd, na.rm = TRUE)
expect_equal(mean, 6.8571428571)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.