Learn R Programming

rmetasim (version 3.1.14)

landscape.exp.het: Calculate expected heterozygosity

Description

Calculate expected heterozygosity from a landscape

Usage

landscape.exp.het(Rland)

Arguments

Rland

the Rmetasim landscape object

Value

A matrix with num loci columns and num populations rows. Each element reflects the expected heterozygosity for that population x locus combination

Details

Calculates the expected heterozygosity in each population: $$1-\Sigma_{i_k} p_i^2$$ where \(p\) is a vector of allele frequencies for a locus in a population.

See Also

landscape.obs.het, Fst.landscape

Examples

Run this code
# NOT RUN {
  exampleland <- landscape.new.example()
  exampleland <- landscape.simulate(exampleland, 4)
  exphet <- landscape.exp.het(exampleland)
  rm(exampleland)
# }

Run the code above in your browser using DataLab