tests/testthat/test-exploitation.R

context("exploitation")

test_that("exploitation", {
  expect_equal(ypr_exploitation(ypr_population(pi = 0.4)), 0.4)
  expect_equal(ypr_exploitation(ypr_population(pi = 0.4, rho = 0.6, Hm = 0.2)), 0.208)
  expect_equal(ypr_exploitation(ypr_population()), 0.2)
  expect_equal(ypr_exploitation(ypr_population(), 0.3), 0.3)
  expect_equal(ypr_exploitation(ypr_population(), numeric(0)), numeric(0))
  expect_equal(ypr_exploitation(ypr_population(), c(0.5, 0.6)), c(0.5, 0.6))
})
poissonconsulting/ypr documentation built on May 16, 2019, 11:12 p.m.