freqnext {hwep} | R Documentation |
Update genotype frequencies after one generation
Description
After one generation of random mating, update the genotype frequencies.
Usage
freqnext(freq, alpha, segmat = NULL, more = FALSE, check = TRUE)
Arguments
freq |
The current genotype frequencies. This should be a
vector of length K+1, where K is the ploidy of the species.
|
alpha |
A numeric vector containing the double reduction parameter(s).
This should be a
vector of length |
segmat |
You can provide your own segregation matrix.
|
more |
A logical. Should we return more output ( |
check |
Should we correct for minor numerical issues? Defaults
to |
Value
If more = FALSE
, then returns a vector of length
length(freq)
that contains the updated genotype frequencies
after one generation of random mating. If more = TRUE
, then
returns a list with these genotype frequencies (q
) as well as the
parental gamete frequencies (p
).
Author(s)
David Gerard
Examples
freq <- c(0.5, 0, 0, 0, 0.5)
freqnext(freq = freq, alpha = 0)