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

View source: R/qD.R

qDR Documentation

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

Description

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

Usage

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

Qin, X., & Gaggiotti, O. E. (2022). Information-based summary statistics for spatial genetic structure inference. Molecular Ecology Resources, 22(6), 2183-2195.

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

# example genepop file
f1 <- function(f) system.file("extdata", f,package="HierDpart")
qD(f1("Island.gen"),q=0,ncode=3)

xinghuq/HierDpart documentation built on March 21, 2023, 6:43 p.m.