| calc_pielou_evenness | R Documentation |
This function calculates Pielou's evenness index, a measure of the distribution of abundances across molecular formulas. Evenness ranges from 0 (one molecular formula dominates) to 1 (all formulas are equally abundant).
Evenness is derived using the Shannon index:
E = \frac{H}{\log(S)}
where:
H is the Shannon diversity index.
S is the number of unique molecular formulas.
If there is only one molecular formula, evenness is defined as 1.
calc_pielou_evenness(mf, magnitude)
mf |
Character vector. A list of unique molecular formulas. |
magnitude |
Numeric vector. A list of respective intensities (abundances) for each molecular formula.
Must be non-negative and have the same length as |
A single numeric value representing Pielou's evenness.
calc_pielou_evenness(
mf = c("C10H20O5", "C12H18O3", "C18H30O6"),
magnitude = c(1982375, 2424, 312410)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.