heterozygosity: Heterozygosity

Description Usage Arguments Note Author(s) Examples

View source: R/heterozygosity.R

Description

Calculate observed and heterozygosity.

Usage

1
heterozygosity(g, by.strata = FALSE, type = c("expected", "observed"))

Arguments

g

a gtypes object.

by.strata

logical - return results by strata?

type

return expected or observed heterozygosity

Note

If g is a haploid object with sequences, the value for expected heterozygosity (= haplotpyic diversity) will be returned.

Author(s)

Eric Archer eric.archer@noaa.gov

Examples

1
2
3
4
5
6
7
data(msats.g)

# Expected heterozygosity
heterozygosity(msats.g, type = "expected")

# Observed heterozygosity by strata
heterozygosity(msats.g, FALSE, "observed")

strataG documentation built on Feb. 28, 2020, 9:07 a.m.