Learn R Programming

fsthet (version 1.0.1)

calc.exp.het: This calculates expected heterozygosities.

Description

This calculates expected heterozygosities from a list of allele frequencies.

Usage

calc.exp.het(af)

Arguments

af

is a list of allele frequencies.

Value

ht

The expected heterozygosity under Hardy-Weinberg expectations. This is a single numerical value.

Examples

Run this code
# 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