test_that("hazard function", {
t <- 3
p1 <- c(0, 1, 2, 3)
lambda <- c(0.1, 0.2, 0.3)
expect_equal(h(t, p1, lambda), 0.3)
expect_equal(h(c(1.5, 2), p1, lambda), c(0.2, 0.2))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.