exp.het.landscape {rmetasim}R Documentation

Calculate expected heterozygosity

Description

Calculate expected heterozygosity from a landscape

Usage

  hetmat <- exp.het.landscape(rland)

Arguments

rland the Rmetasim landscape object

Details

Calculates the expected heterozygosity in each population:

1 - sum(p^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

obs.het.landscape, Fst.landscape

Examples

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

[Package rmetasim version 1.0.3 Index]