Description Usage Arguments Note Author(s) Examples
View source: R/heterozygosity.R
Calculate observed and heterozygosity.
1 | heterozygosity(g, by.strata = FALSE, type = c("expected", "observed"))
|
g |
a gtypes object. |
by.strata |
logical - return results by strata? |
type |
return |
If g
is a haploid object with sequences, the value for
expected heterozygosity (= haplotpyic diversity) will be returned.
Eric Archer eric.archer@noaa.gov
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.