Hs_calc: Gene diversity (Hs).

Description Usage Value Examples

View source: R/sample_stats.r

Description

Calculates Nei's (1987) gene diversity (= Hs = expected heterozygosity corrected for small sample size) for each locus and each population sample. Code is modified from function hierfstat::basic.stats and relies on several functions from the hierfstat library: pop.freq(), ind.count(), getal.b().

Usage

1

Value

A matrix of calculated Hs values, with one row per locus and one column per population sample.

Examples

1
test <- Hs_calc(dat.sim)

Daniel-J-Schmidt/genrich documentation built on Aug. 15, 2017, 8:15 p.m.