hardy.weinberg {learnPopGen} | R Documentation |
Computes Hardy-Weinberg frequencies for a multiallelic locus or across multiple loci
Description
hardy.weinberg
computes Hardy-Weinberg frequencies for a multiallelic locus using arbitrary allele frequencies.
multilocus.hw
computes multilocus Hardy-Weinberg frequencies for a set of biallelic loci.
Usage
hardy.weinberg(p=c(0.5,0.5), alleles=c("A","a"), as.matrix=FALSE)
multilocus.hw(nloci=2, p=NULL)
Arguments
p |
allele frequencies. In the case of |
alleles |
names of the alleles. |
as.matrix |
logical argument indicating whether to return the result in the form of a matrix (if |
nloci |
for |
Value
Returns a matrix or vector.
Author(s)
Liam Revell liam.revell@umb.edu
See Also
Examples
hardy.weinberg()
hardy.weinberg(p=c(0.4,0.3,0.2,0.1),alleles=letters[1:4])
[Package learnPopGen version 1.0.4 Index]