calc.exp.het {fsthet} | R Documentation |
This calculates expected heterozygosities from a list of allele frequencies.
calc.exp.het(af)
af |
is a list of allele frequencies. |
ht |
The expected heterozygosity under Hardy-Weinberg expectations. This is a single numerical value. |
#create a random sample of genotypes
genotypes<-sample(c("0101","0102","0202"),50,replace=TRUE)
af<-calc.allele.freq(genotypes)
hs<-calc.exp.het(af)