View source: R/fct_shannon_h_div.R
shannon_h_div | R Documentation |
Shannon's H diversity index is a measure of the richness (abundance) evenness (balance or proportional abundance of each element). Thus, to use the example of a mixed cropping field. A field is more diverse if it has more crops grown in it and an equal area is allocated to each crop.
shannon_h_div(...)
... |
Two or more numeric vectors containing the proportion of a species. Each element (row) in the vector corresponds to a geographic unit or group that Shannon's H is calculated for. |
The function takes a series of numeric vectors as arguments. Each vector represents the proportion of species within a geographic unit or group. The function will check all input vectors are numeric. It will also rescale all row wise elements to sum to one. Any species with a zero proportion will be allocated a small proportion (0.00001) to enable Shannon's H to be computed.
The Shannon's H diversity score for each unit; returned as a numeric vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.