Learn R Programming

strataG (version 2.4.905)

heterozygosity: Heterozygosity

Description

Calculate observed and heterozygosity.

Usage

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

Examples

Run this code
# NOT RUN {
data(msats.g)

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

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

# }

Run the code above in your browser using DataLab