R/twidth.R

Defines functions twidth

Documented in twidth

#' @title twidth
#'
#' @description
#' \code{twidth} given selection and dispersal function returns
#' diffusion approximation of width of one locus cline
#'
#' @param s selection
#'
#' @param sigma dispersal
#'
#' @author Kamil Jaron \email{kamiljaron at gmail.com}
#'
#' @export
# comment: theoretical width. sigma^2=dispersal; s=selection

twidth <- function(s, sigma = sqrt(0.5)){
    fact = sqrt(8)
    return((fact * sigma) / sqrt(s))
}
KamilSJaron/ConjunctionStats documentation built on May 7, 2019, 12:06 p.m.