HierDstr | R Documentation |
This function formats the hierarchial diversity data used for plotting the diversity in a hierarchy.The function takes the values produced from "HierDq", and then formats it into igraph hierarchy.
x |
The diversity data from HierDq |
The plot has two forms, if the geographic coordinates are provided, it will plot the geo-map using "HierGeoplot", if not, it will plot the hierarchy map.
The hierarchical diversity formated in a igraph format.
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.
### load data
f <- system.file('extdata',package='HierDpart')
infile <- file.path(f, "Island.gen")
### calculate diversity profile
HierDisland=HierDq(infile,q=2,ncode=3,nreg = 4,r=c(7,4,2,3))
### structure the diversity values
hie_mapdata=HierDstr(HierDisland)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.