HierDstr: Formating the hierarchial diversity data structure used for...

View source: R/HierDstr.R

HierDstrR Documentation

Formating the hierarchial diversity data structure used for plotting

Description

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.

Arguments

x

The diversity data from HierDq

Details

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.

Value

The hierarchical diversity formated in a igraph format.

Author(s)

qinxinghu@gmail.com

References

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.

Examples


### 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)


xinghuq/HierDmap documentation built on July 2, 2023, 10:46 a.m.