powered by
This calculates expected heterozygosities from a list of allele frequencies.
calc.exp.het(af)
is a list of allele frequencies.
The expected heterozygosity under Hardy-Weinberg expectations. This is a single numerical value.
# NOT RUN { #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) # }
Run the code above in your browser using DataLab