landscape.exp.het: Calculate expected heterozygosity

View source: R/diversity.R

landscape.exp.hetR Documentation

Calculate expected heterozygosity

Description

Calculate expected heterozygosity from a landscape

Usage

   landscape.exp.het(Rland)

Arguments

Rland

the Rmetasim landscape object

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.

Value

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

See Also

landscape.obs.het, Fst.landscape

Examples

  exampleland <- landscape.new.example()
  exampleland <- landscape.simulate(exampleland, 4)
  exphet <- landscape.exp.het(exampleland)
  rm(exampleland)

stranda/rmetasim documentation built on Aug. 25, 2023, 12:22 p.m.