internal_cline_eqn: Calculate allele frequencies for a single point along a cline

Description Usage Arguments Value

View source: R/general_cline_eqn.R

Description

A flexible function to evaluate hybrid zone genetic cline equations at a single point. Used internally by general_cline_eqn, which calculates results for multiple points. See that help page for all the math details.

Usage

1
2
3
internal_cline_eqn(transectDist, decrease = c(TRUE, FALSE), center,
  width, pmin = 0, pmax = 1, deltaL = NULL, tauL = NULL,
  deltaR = NULL, tauR = NULL)

Arguments

transectDist

The position at which to evaluate the cline equation. Must be a numeric vector.

decrease

Is the cline decreasing in frequency? TRUE or FALSE.

center

The location of the cline center, in the same distance units as transectDist. Numeric.

width

The width of the cline, in the same distance units as transectDist. Numeric, must be greater than 0.

pmin, pmax

Optional. The minimum and maximum allele frequency values in the tails of the cline. Default values are 0 and 1, respectively. Must be between 0 and 1 (inclusive). Numeric.

deltaL, tauL

Optional delta and tau parameters which describe the left exponential introgression tail. Must supply both to generate a tail. Default is NULL (no tails). Numeric. tauL must be between 0 and 1 (inclusive).

deltaR, tauR

Optional delta and tau parameters which describe the right exponential introgression tail. Must supply both to generate a tail. Default is NULL (no tails). Numeric. tauR must be between 0 and 1 (inclusive).

Value

The result of evaluating a cline equation with the specified parameters at the specified distance (that is, p' in the notation of the equations above). A numeric vector of length 1.


tjthurman/BAHZ documentation built on May 30, 2020, 8:28 a.m.