R/exploitation.R

Defines functions ypr_exploitation

Documented in ypr_exploitation

#' Exploitation Probability
#'
#' Converts capture probabilities into exploitation probabilities based on the
#' release and handling mortality probabilities where
#' the probability of exploitation includes handling mortalities.
#' The calculation assumes that a released fish cannot be recaught in the same year.
#'
#' In the case of no release (or 100% handling mortalities) the exploitation probability
#' is identical to the capture probability.
#' Otherwise it is less.
#'
#' @inheritParams ypr_schedule
#' @param pi A vector of capture probabilities to calculate the exploitation probabilities for.
#' @return A vector of exploitation probabilities.
#' @seealso \code{\link{ypr_population}}
#' @export
#' @examples
#' ypr_exploitation(ypr_population(pi = 0.4))
#' ypr_exploitation(ypr_population(pi = 0.4, rho = 0.6, Hm = 0.2))
ypr_exploitation <- function(population, pi = population$pi) {
  check_population(population)
  check_vector(pi, c(0, 1))

  population$pi <- pi

  u <- with(population, {
    pi * (1 - rho) + pi * rho * Hm
  })
  u
}
poissonconsulting/ypr documentation built on May 16, 2019, 11:12 p.m.