Description Usage Arguments Value Author(s) See Also Examples
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.
1 2 | hardy.weinberg(p=c(0.5,0.5), alleles=c("A","a"), as.matrix=FALSE)
multilocus.hw(nloci=2, p=NULL)
|
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 |
Returns a matrix or vector.
Liam Revell liam.revell@umb.edu
1 2 | hardy.weinberg()
hardy.weinberg(p=c(0.4,0.3,0.2,0.1),alleles=letters[1:4])
|
AA Aa aa
0.25 0.50 0.25
aa ab ac ad bb bc bd cc cd dd
0.16 0.24 0.16 0.08 0.09 0.12 0.06 0.04 0.04 0.01
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.