tests/testthat/test-get_discount_factor.R

testthat::test_that("results the same", {

  testthat::expect_equal(
    object =
      healthiar::get_discount_factor(
        discount_rate = 0.07,
        n_years = 5
      ),
    expect = 0.712986179) # Results on 2025-10-01; no comparison study
})

Try the healthiar package in your browser

Any scripts or data that you put into this service are public.

healthiar documentation built on March 12, 2026, 5:07 p.m.