calcDivProf {chemodiv} | R Documentation |
Calculate a diversity profile
Description
Function to calculate a diversity profile, i.e. calculate Hill diversity or Functional Hill Diversity for a range of q values.
Usage
calcDivProf(
sampleData,
compDisMat = NULL,
type = "HillDiv",
qMin = 0,
qMax = 3,
step = 0.1
)
Arguments
sampleData |
Data frame with the relative concentration of each compound (column) in every sample (row). |
compDisMat |
Compound distance matrix, as calculated by
|
type |
Type of Hill Diversity to calculate for the diversity profile.
|
qMin |
Minimum value of q. |
qMax |
Maximum value of q. |
step |
Increment by which q will be calculated between |
Details
The function calculates a diversity profile for each sample
in sampleData
. A diversity profile is a calculation of
Hill Diversity or Functional Hill Diversity for a range of
different values of q. This function performs the calculations,
while chemoDivPlot
can be used to conveniently
create the diversity profile plot, where Hill Diversity is
plotted as a function of q within the chosen range.
The shape of the diversity profile curve reflects the evenness
of compound proportions in the sample. For a perfectly even sample
the curve is flat. The more uneven the compound proportions are,
the more steep is the decline of the curve. A common range,
used as default, of q values is between qMin = 0
and
qMax = 3
, as diversity should change little beyond qMax = 3
.
See calcDiv
for further details on q.
Value
List with a diversity profile data frame with samples as rows
and the Hill diversity or Functional Hill diversity for different q
values as columns; and values for type
, qMin
,
qMax
and step
.
References
Chao A, Chiu C-H, Jost L. 2014. Unifying Species Diversity, Phylogenetic Diversity, Functional Diversity, and Related Similarity and Differentiation Measures Through Hill Numbers. Annual Review of Ecology, Evolution, and Systematics 45: 297-324.
Examples
data(minimalSampData)
data(minimalCompDis)
calcDivProf(sampleData = minimalSampData)
calcDivProf(sampleData = minimalSampData, compDisMat = minimalCompDis,
type = "FuncHillDiv")
data(alpinaCompData)
data(alpinaCompDis)
calcDivProf(sampleData = alpinaSampData, compDisMat = alpinaCompDis,
type = "FuncHillDiv", qMin = 1, qMax = 2, step = 0.2)