Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in sub-module Diversity.Jost to provide support for Jost's divers…
…ity measures. jostD() is simply qD() from the main package or hillnumbers() from Diversity.Hill jostbeta (or jostβ) is Jost's naive beta diversity, the gamma diversity of the ecosystem divided by the alpha diversity.
- Loading branch information
1 parent
8910f74
commit d3b6cce
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Diversity | ||
|
||
## jostD - calculate naive diversity of order q of a population with | ||
## given relative proportions | ||
## | ||
## Arguments: | ||
## - proportions - relative proportions of different individuals / | ||
## species in population | ||
## - qs - single number or vector of orders of diversity measurement | ||
jostD = qD | ||
|
||
|
||
## jostbeta - calculate Jost's beta diversity of multiple sub-communities | ||
## Calculates Jost's beta diversity of a series of columns representing | ||
## independent community counts, for a series of orders, repesented as | ||
## a vector of qs. This is just the naive gamma diversity divided by | ||
## the naive alpha diversity | ||
## | ||
## Arguments: | ||
## - proportions - population proportions | ||
## - qs - vector of values of parameter q | ||
## | ||
## Returns: | ||
## - array of diversities, first dimension representing sub-communities, and | ||
## last representing values of q | ||
function jostbeta{S <: FloatingPoint, | ||
T <: Number}(proportions::Matrix{S}, qs::Union(T, Vector{T})) | ||
Ḡ(proportions, qs) ./ Ā(proportions, qs) | ||
end | ||
|
||
jostβ = jostbeta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters