tests/testthat/test-get_ana_rate.R

test_that("use", {
  ps_ana_rate <- 1
  n_immigrants <- 5
  ana_rate <- get_ana_rate(
    laa = ps_ana_rate,
    num_immigrants = n_immigrants)
  created <- get_ana_rate(
    laa = 1,
    num_immigrants = 5)
  expected <- ps_ana_rate * n_immigrants
  testthat::expect_equal(expected, created)
})

Try the DAISIE package in your browser

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

DAISIE documentation built on Oct. 22, 2023, 1:06 a.m.