# Generated by fusen: do not edit by hand
#' Calculate the effective strip width of a half normal function
#'
#' This function comes from the pelaDSM package. This functions allows to calculate the effective strip width corresponding to the sigma of a half normal detection function.
#' @param sigma numeric. Sigma of half normal function.
#'
#' @importFrom stats pnorm dnorm
#' @importFrom assertthat assert_that
#'
#' @return numeric. esw in km associated to the sigma given.
#' @export
#' @examples
#'
#' esw_hn(sigma = 0.3)
#'
#' # esw of 0.376 km
#'
esw_hn <- function(sigma){
assert_that(is.numeric(sigma))
esw <- (pnorm(+Inf, 0, sigma) - 0.5) / dnorm(0, 0, sigma)
return(esw)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.