qD: Function for calculating genetic diversity profile (q=0,1,2)

Description Usage Arguments Details Value Author(s) References Examples

View source: R/qD.R

Description

This function calculates genetic diversity profile (q=0, 1, 2).

Usage

1
qD(x, q, ncode)

Arguments

x

Input data, genepop format.

q

Hill numbers, q=0,1,2.

ncode

The coding type of the genetic file.

Details

This function returns different genetic diversities, q is the order of Hill number, specifically, richness (q=0), exponential Shannon entropy (q=1), and heterozygosity related measure (q=2, ^2D=1/(1-He)).

Value

Result returns to the diversity profile (q) as you defined.

Author(s)

qinxinghu@gmail.com

References

Marcon, E., & Herault, B. (2015). entropart: An R package to measure and partition diversity. Journal of Statistical Software, 67(8).

Gaggiotti, O. E., Chao, A., Peres-Neto, P., Chiu, C. H., Edwards, C., Fortin, M. J., ... & Selkoe, K. A. (2018). Diversity from genes to ecosystems: A unifying framework to study variation across biological metrics and scales. Evolutionary Applications.

Examples

1
2
3
4
# example genepop file
f <- system.file('extdata',package='HierDpart')
infile <- file.path(f, "Island.gen")
qD(infile,q=0,ncode=3)

HierDpart documentation built on March 31, 2021, 5:09 p.m.