HierDq | R Documentation |
Calculating hierarchical diversity based on Hill numbers.When q=0, it is richness, when q=1, it is diversity of Shannon (exponential of shannon entropy), when q=2, it is diversity of Simpson.
HierDq(x, q, nreg, r, ncode)
x |
Genotype file, current version accepts genepop format. |
q |
The order of Hill numbers |
nreg |
number of regions |
r |
The population arrangement or the hierarchy in the region |
ncode |
The genotype coding type |
The function calculates diversity at ecosystem level, regional level, and local population level based on HierDpart package (Qin, X.2019).
Diversity at ecosystem level, regional level, and local population level.
qinxinghu@gmail.com
Qin, X. (2019). HierDpart: partitioning hierarchical diversity and differentiation across metrics and scales, from genes to ecosystems. R package version 0.5. 0 https://cran. r-project. org/package= HierDpart.
f <- system.file('extdata',package='HierDpart')
infile <- file.path(f, "Island.gen")
file = diveRsity::readGenepop(infile, gp=2, bootstrap = FALSE)
HierDisland=HierDq(infile,q=2,ncode=3,nreg = 4,r=c(7,4,2,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.