diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 51bfcc8..cc058ae 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-21T10:04:19","documenter_version":"1.5.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-21T13:13:51","documenter_version":"1.5.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 402d013..ba351fd 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -5,8 +5,8 @@ function _counttypes(phy::Phylogeny) return phy.nancestral -end

extends Diversity.API._counttypes() (and therefore the directly accessible counttypes() interface) to handle the Phylogeny subtype of AbstractTypes.

Diversity.APIModule
Diversity.API submodule

The Diversity.API submodule should be imported if you want to create a new type, partition or metacommunity subtype. Otherwise it can be ignored.

source
Diversity.API.AbstractMetacommunityType
AbstractMetacommunity{FP <: AbstractFloat,
+end

extends Diversity.API._counttypes() (and therefore the directly accessible counttypes() interface) to handle the Phylogeny subtype of AbstractTypes.

Diversity.APIModule
Diversity.API submodule

The Diversity.API submodule should be imported if you want to create a new type, partition or metacommunity subtype. Otherwise it can be ignored.

source
Diversity.API.AbstractMetacommunityType
AbstractMetacommunity{FP <: AbstractFloat,
                       ARaw <: AbstractArray,
                       AProcessed <: AbstractMatrix{FP},
                       Sim <: AbstractTypes,
-                      Part <: AbstractPartition}

AbstractMetacommunity is the abstract supertype of all metacommunity types. AbstractMetacommunity subtypes allow you to define how to partition your total metacommunity (e.g. an ecosystem) into smaller components (e.g. subcommunities), and how to assess similarity between individuals within it.

source
Diversity.API.AbstractPartitionType
AbstractPartition

Abstract supertype for all partitioning types. AbstractPartition subtypes allow you to define how to partition your total metacommunity (e.g. an ecosystem) into smaller components (e.g. subcommunities).

source
Diversity.API.AbstractTypesType
AbstractTypes

Abstract supertype for all similarity types. Its subtypes allow you to define how similarity is measured between individuals.

source
Diversity.API._calcabundanceFunction
_calcabundance(t::AbstractTypes, a::AbstractArray)

Calculates the abundance a for AbstractTypes, t (if necessary). May be implemented by each AbstractTypes subtype.

source
Diversity.API._calcordinarinessFunction
_calcordinariness(t::AbstractTypes, a::AbstractArray, scale::Real)

Calculates the ordinariness of abundance a from AbstractTypes, t. May be implemented by each AbstractTypes subtype.

source
Diversity.API._calcsimilarityFunction
_calcsimilarity(t::AbstractTypes, scale::Real)

Retrieves (and possibly calculates) a similarity matrix from t. Must be implemented by each AbstractTypes subtype.

source
Diversity.API._countsubcommunitiesFunction
_countsubcommunities(::AbstractPartition)

Returns number of subcommunities in a partition, p. May be implemented by each AbstractPartition subtype. Default is to count length of subcommunity name vector.

source
Diversity.API._counttypesFunction
_counttypes(::AbstractTypes, raw::Bool)

Returns number of types in an AbstractTypes object, t. May be implemented by each AbstractTypes subtype. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny. Default is to count length of corresponding types name vector.

source
Diversity.API._getabundanceFunction
_getabundance(m::AbstractMetacommunity, raw::Bool)

Returns the abundances array of the metacommunity. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getmetaabundanceFunction
_getmetaabundance(m::AbstractMetacommunity, raw::Bool)

Returns the metacommunity abundances of the metacommunity. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getmetaordinariness!Function
_getmetaordinariness!(m::AbstractMetacommunity)

Returns (and possibly calculates) the ordinariness of the metacommunity as a whole. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getordinariness!Function
_getordinariness!(m::AbstractMetacommunity)

Returns (and possibly calculates) the ordinariness array of the subcommunities. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getpartitionFunction
_getpartition(::AbstractMetacommunity)

Returns the AbstractPartition component of the metacommunity. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getscaleFunction
_getscale(m::AbstractMetacommunity)

Returns a scaling factor for the metacommunity (needed for phylogenetics). Normally ignored. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getsubcommunitynamesFunction
_getsubcommunitynames(p::AbstractPartition)

Returns the names of the subcommunities in the partition object. Must be implemented by each AbstractPartition subtype.

source
Diversity.API._gettypenamesFunction
_gettypenames(t::AbstractTypes, raw::Bool)

Returns the names of the types in an AbstractTypes object. Must be implemented by each AbstractTypes subtype. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny.

source
Diversity.API._gettypesFunction
_gettypes(::AbstractMetacommunity)

Returns the AbstractTypes component of the metacommunity. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getweightFunction
_getweight(m::AbstractMetacommunity)

Returns the subcommunity weights of the metacommunity. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API.floattypesFunction
floattypes(t)

This function returns a set containing the floating point types that are compatible with the Diversity-related object, t.

source
Diversity.API.mcmatchFunction
mcmatch(procm::AbstractArray, sim::AbstractTypes, part::AbstractPartition)

Checks for type and size compatibility for elements contributing to a Metacommunity

source
Diversity.API.typematchMethod
typematch(args...)

Checks whether the types of a variety of Diversity-related objects have compatible types (using floattypes()).

source
+ Part <: AbstractPartition}

AbstractMetacommunity is the abstract supertype of all metacommunity types. AbstractMetacommunity subtypes allow you to define how to partition your total metacommunity (e.g. an ecosystem) into smaller components (e.g. subcommunities), and how to assess similarity between individuals within it.

source
Diversity.API.AbstractPartitionType
AbstractPartition

Abstract supertype for all partitioning types. AbstractPartition subtypes allow you to define how to partition your total metacommunity (e.g. an ecosystem) into smaller components (e.g. subcommunities).

source
Diversity.API.AbstractTypesType
AbstractTypes

Abstract supertype for all similarity types. Its subtypes allow you to define how similarity is measured between individuals.

source
Diversity.API._addedoutputcolsFunction
_addedoutputcols(::AbstractTypes)

Returns the name of any additional columns needed to be added to outputs.

source
Diversity.API._calcabundanceFunction
_calcabundance(t::AbstractTypes, a::AbstractArray)

Calculates the abundance a for AbstractTypes, t (if necessary). May be implemented by each AbstractTypes subtype.

source
Diversity.API._calcordinarinessFunction
_calcordinariness(t::AbstractTypes, a::AbstractArray, scale::Real)

Calculates the ordinariness of abundance a from AbstractTypes, t. May be implemented by each AbstractTypes subtype.

source
Diversity.API._calcsimilarityFunction
_calcsimilarity(t::AbstractTypes, scale::Real)

Retrieves (and possibly calculates) a similarity matrix from t. Must be implemented by each AbstractTypes subtype.

source
Diversity.API._countsubcommunitiesFunction
_countsubcommunities(::AbstractPartition)

Returns number of subcommunities in a partition, p. May be implemented by each AbstractPartition subtype. Default is to count length of subcommunity name vector.

source
Diversity.API._counttypesFunction
_counttypes(::AbstractTypes, raw::Bool)

Returns number of types in an AbstractTypes object, t. May be implemented by each AbstractTypes subtype. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny. Default is to count length of corresponding types name vector.

source
Diversity.API._getabundanceFunction
_getabundance(m::AbstractMetacommunity, raw::Bool)

Returns the abundances array of the metacommunity. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getaddedoutputFunction
_getaddedoutput(::AbstractTypes)

Returns the name of any additional columns needed to be added to outputs.

source
Diversity.API._getdiversitynameFunction
_getdiversityname(::AbstractTypes)

Returns the name of the diversity type used to calculate.

source
Diversity.API._getmetaabundanceFunction
_getmetaabundance(m::AbstractMetacommunity, raw::Bool)

Returns the metacommunity abundances of the metacommunity. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getmetaordinariness!Function
_getmetaordinariness!(m::AbstractMetacommunity)

Returns (and possibly calculates) the ordinariness of the metacommunity as a whole. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getordinariness!Function
_getordinariness!(m::AbstractMetacommunity)

Returns (and possibly calculates) the ordinariness array of the subcommunities. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getpartitionFunction
_getpartition(::AbstractMetacommunity)

Returns the AbstractPartition component of the metacommunity. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getscaleFunction
_getscale(m::AbstractMetacommunity)

Returns a scaling factor for the metacommunity (needed for phylogenetics). Normally ignored. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getsubcommunitynamesFunction
_getsubcommunitynames(p::AbstractPartition)

Returns the names of the subcommunities in the partition object. Must be implemented by each AbstractPartition subtype.

source
Diversity.API._gettypenamesFunction
_gettypenames(t::AbstractTypes, raw::Bool)

Returns the names of the types in an AbstractTypes object. Must be implemented by each AbstractTypes subtype. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny.

source
Diversity.API._gettypesFunction
_gettypes(::AbstractMetacommunity)

Returns the AbstractTypes component of the metacommunity. Must be implemented by each AbstractMetacommunity subtype.

source
Diversity.API._getweightFunction
_getweight(m::AbstractMetacommunity)

Returns the subcommunity weights of the metacommunity. May be implemented by each AbstractMetacommunity subtype.

source
Diversity.API.floattypesFunction
floattypes(t)

This function returns a set containing the floating point types that are compatible with the Diversity-related object, t.

source
Diversity.API.mcmatchFunction
mcmatch(procm::AbstractArray, sim::AbstractTypes, part::AbstractPartition)

Checks for type and size compatibility for elements contributing to a Metacommunity

source
Diversity.API.typematchMethod
typematch(args...)

Checks whether the types of a variety of Diversity-related objects have compatible types (using floattypes()).

source
diff --git a/dev/ecology/index.html b/dev/ecology/index.html index b036397..df28445 100644 --- a/dev/ecology/index.html +++ b/dev/ecology/index.html @@ -69,20 +69,20 @@ Row │ div_type measure type_level type_name partition_level partition_name diversity │ String String String String String String Float64 ─────┼───────────────────────────────────────────────────────────────────────────────────────── - 1 │ Arbitrary Z Pielou types metacommunity 0.510146
Diversity.EcologyModule
Diversity.Ecology submodule

The Diversity.Ecology module replicates old ecological diversity measures and generalised versions of them that relate to our general measures of alpha, beta and gamma diversity at subcommunity and metacommunity levels. The generalisations of the richness, Shannon and Simpson are the only standard measures we are aware of whose subcommunity components sum directly to the corresponding ecosystem measure (although note that Simpson's index decreases for increased diversity, so small components are more diverse).

source
Diversity.Ecology.generalisedjaccardFunction
generalisedjaccard(proportions::AbstractArray, qs, Z::AbstractMatrix)
+   1 │ Arbitrary Z  Pielou   types                  metacommunity                     0.510146
Diversity.EcologyModule
Diversity.Ecology submodule

The Diversity.Ecology module replicates old ecological diversity measures and generalised versions of them that relate to our general measures of alpha, beta and gamma diversity at subcommunity and metacommunity levels. The generalisations of the richness, Shannon and Simpson are the only standard measures we are aware of whose subcommunity components sum directly to the corresponding ecosystem measure (although note that Simpson's index decreases for increased diversity, so small components are more diverse).

source
Diversity.Ecology.generalisedjaccardFunction
generalisedjaccard(proportions::AbstractArray, qs, Z::AbstractMatrix)
 generalisedjaccard(proportions::AbstractArray, qs, sim::AbstractTypes)
-generalisedjaccard(meta::AbstractAssemblage, qs)

Calculates a generalisation of the Jaccard similarity of two columns representing the counts of two subcommunities. This evaluates to raw alpha / gamma - 1 for a series of orders, repesented as a vector of qs (or a single number). It also includes an optional similarity matrix for the species. This gives a measure of the distinctness of the subcommunities, though we believe that beta and normalised beta have better properties.

Arguments:

  • proportions: population proportions

  • meta: metacommunity / assemblage

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • Jaccard-related distinctivess measures
source
Diversity.Ecology.generalisedrichnessFunction
generalisedrichness(level::DiversityLevel, proportions::AbstractArray,
+generalisedjaccard(meta::AbstractAssemblage, qs)

Calculates a generalisation of the Jaccard similarity of two columns representing the counts of two subcommunities. This evaluates to raw alpha / gamma - 1 for a series of orders, repesented as a vector of qs (or a single number). It also includes an optional similarity matrix for the species. This gives a measure of the distinctness of the subcommunities, though we believe that beta and normalised beta have better properties.

Arguments:

  • proportions: population proportions

  • meta: metacommunity / assemblage

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • Jaccard-related distinctivess measures
source
Diversity.Ecology.generalisedrichnessFunction
generalisedrichness(level::DiversityLevel, proportions::AbstractArray,
                     Z::AbstractMatrix)
 generalisedrichness(level::DiversityLevel, proportions::AbstractArray,
-                    sim::AbstractTypes)

Calculates species richness (diversity at q = 0) of a series of columns representing subcommunity counts, allowing a similarity matrix for the types / species.

Arguments:

  • level: DiversityLevel to calculate at (e.g. subcommunityDiversity)

  • proportions: population proportions

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • diversity (at ecosystem level) or diversities (of subcommunities)
source
Diversity.Ecology.generalisedshannonFunction
generalisedshannon(level::DiversityLevel, proportions::AbstractArray,
+                    sim::AbstractTypes)

Calculates species richness (diversity at q = 0) of a series of columns representing subcommunity counts, allowing a similarity matrix for the types / species.

Arguments:

  • level: DiversityLevel to calculate at (e.g. subcommunityDiversity)

  • proportions: population proportions

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • diversity (at ecosystem level) or diversities (of subcommunities)
source
Diversity.Ecology.generalisedshannonFunction
generalisedshannon(level::DiversityLevel, proportions::AbstractArray,
                    Z::AbstractMatrix)
 generalisedshannon(level::DiversityLevel, proportions::AbstractArray,
-                   sim::AbstractTypes)

Calculates Shannon entropy (log of diversity at q = 1) of a series of columns representing independent subcommunity counts, allowing a similarity matrix for the types / species.

Arguments:

  • level: DiversityLevel to calculate at (e.g. subcommunityDiversity)

  • proportions: population proportions

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • entropy (at metacommunity level) or entropies (of subcommunities)
source
Diversity.Ecology.generalisedsimpsonFunction
generalisedsimpson(level::DiversityLevel, proportions::AbstractArray,
+                   sim::AbstractTypes)

Calculates Shannon entropy (log of diversity at q = 1) of a series of columns representing independent subcommunity counts, allowing a similarity matrix for the types / species.

Arguments:

  • level: DiversityLevel to calculate at (e.g. subcommunityDiversity)

  • proportions: population proportions

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • entropy (at metacommunity level) or entropies (of subcommunities)
source
Diversity.Ecology.generalisedsimpsonFunction
generalisedsimpson(level::DiversityLevel, proportions::AbstractArray,
                    Z::AbstractMatrix)
 generalisedsimpson(level::DiversityLevel, proportions::AbstractArray,
-                   sim::AbstractTypes)

Calculates Simpson's index (1 / diversity at q = 2) of a series of columns representing independent subcommunity counts, allowing a similarity matrix for the types / species.

Arguments:

  • level: DiversityLevel to calculate at (e.g. subcommunityDiversity)

  • proportions: population proportions

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • concentration (at ecosystem level) or concentrations (of subcommunities)
source
Diversity.Ecology.gowerFunction
gower(proportions::AbstractMatrix; countzeros::Bool = false, logscale::Bool = true)
-gower(asm::AbstractAssemblage; countzeros::Bool = false, logscale::Bool = true)

Calculates Gower's dissimarity of up to two columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions; or
  • count: population counts; or
  • asm: Abstract Assemblage
  • ``

Returns:

  • Gower dissimilarity of the subcommunities
source
Diversity.Ecology.jaccardMethod
jaccard(proportions::AbstractMatrix)
-jaccard(asm::AbstractAssemblage)

Calculates Jaccard similarity coefficient of two columns representing independent subcommunity counts

Arguments:

  • proportions: population proportions
  • asm: assemblage / metacommunity

Returns:

  • the Jaccard index
source
Diversity.Ecology.pielouMethod
pielou(proportions::AbstractMatrix)
+                   sim::AbstractTypes)

Calculates Simpson's index (1 / diversity at q = 2) of a series of columns representing independent subcommunity counts, allowing a similarity matrix for the types / species.

Arguments:

  • level: DiversityLevel to calculate at (e.g. subcommunityDiversity)

  • proportions: population proportions

  • Z: similarity matrix or

  • sim: instance of AbstractTypes

Returns:

  • concentration (at ecosystem level) or concentrations (of subcommunities)
source
Diversity.Ecology.gowerFunction
gower(proportions::AbstractMatrix; countzeros::Bool = false, logscale::Bool = true)
+gower(asm::AbstractAssemblage; countzeros::Bool = false, logscale::Bool = true)

Calculates Gower's dissimarity of up to two columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions; or
  • count: population counts; or
  • asm: Abstract Assemblage
  • ``

Returns:

  • Gower dissimilarity of the subcommunities
source
Diversity.Ecology.jaccardMethod
jaccard(proportions::AbstractMatrix)
+jaccard(asm::AbstractAssemblage)

Calculates Jaccard similarity coefficient of two columns representing independent subcommunity counts

Arguments:

  • proportions: population proportions
  • asm: assemblage / metacommunity

Returns:

  • the Jaccard index
source
Diversity.Ecology.pielouMethod
pielou(proportions::AbstractMatrix)
 pielou(asm::AbstractAssemblage)

Calculates Pielou's evenness of a series of columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions

Returns:

  • evenness of subcommunities

Example:

communitymat = [10 20 30 20 0;
                 10 0 50 80 10;
                 60 10 90 0 0; 
@@ -90,4 +90,4 @@
                 70 70 70 70 70;
                 10 0 0 90 0];
 
-pielou(communitymat)
source
Diversity.Ecology.richnessMethod
richness(proportions::AbstractMatrix)

Calculates species richness (diversity at q = 0) of a series of columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions

Returns:

  • diversities of subcommunities
source
Diversity.Ecology.shannonMethod
shannon(proportions::AbstractVecOrMat)

Calculates shannon entropy (log of diversity at q = 1) of a series of columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions

Returns:

  • entropies of subcommunities
source
Diversity.Ecology.simpsonMethod
simpson(proportions::AbstractMatrix)

Calculates Simpson's index (1 / diversity at q = 2) of a series of columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions

Returns:

  • concentrations of subcommunities
source
+pielou(communitymat)source
Diversity.Ecology.richnessMethod
richness(proportions::AbstractMatrix)

Calculates species richness (diversity at q = 0) of a series of columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions

Returns:

  • diversities of subcommunities
source
Diversity.Ecology.shannonMethod
shannon(proportions::AbstractVecOrMat)

Calculates shannon entropy (log of diversity at q = 1) of a series of columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions

Returns:

  • entropies of subcommunities
source
Diversity.Ecology.simpsonMethod
simpson(proportions::AbstractMatrix)

Calculates Simpson's index (1 / diversity at q = 2) of a series of columns representing independent subcommunity counts.

Arguments:

  • proportions: population proportions

Returns:

  • concentrations of subcommunities
source
diff --git a/dev/hill/index.html b/dev/hill/index.html index 8c2ffa0..0a34baf 100644 --- a/dev/hill/index.html +++ b/dev/hill/index.html @@ -12,4 +12,4 @@ ─────┼────────────────────────────────────────────────────────────────────────────────────── 1 │ HillNumber 0 types subcommunity 1 4.0 2 │ HillNumber 1 types subcommunity 1 3.36264 - 3 │ HillNumber 2 types subcommunity 1 3.09021
Diversity.HillModule
Diversity.Hill submodule

Hill numbers are found in the Diversity.Hill package.

source
Diversity.Hill.hillnumberMethod
hillnumber(proportions, qs)

Calculate the Hill number (or naive diversity) of order q of population(s) with given relative proportions

Arguments:

  • proportions: relative proportions of different individuals / species in population (vector, or matrix where columns are individual populations)

  • qs: single number or vector of orders of diversity measurement

Returns:

  • Diversity of order qs (single number or vector of diversities)
source
+ 3 │ HillNumber 2 types subcommunity 1 3.09021
Diversity.HillModule
Diversity.Hill submodule

Hill numbers are found in the Diversity.Hill package.

source
Diversity.Hill.hillnumberMethod
hillnumber(proportions, qs)

Calculate the Hill number (or naive diversity) of order q of population(s) with given relative proportions

Arguments:

  • proportions: relative proportions of different individuals / species in population (vector, or matrix where columns are individual populations)

  • qs: single number or vector of orders of diversity measurement

Returns:

  • Diversity of order qs (single number or vector of diversities)
source
diff --git a/dev/index.html b/dev/index.html index f27c54f..a413073 100644 --- a/dev/index.html +++ b/dev/index.html @@ -33,15 +33,15 @@ ─────┼──────────────────────────────────────────────────────────────────────────────────────────────── 1 │ Arbitrary Z RawRho 2 types subcommunity 1 2.0 2 │ Arbitrary Z RawRho 2 types subcommunity 2 3.0 - 3 │ Arbitrary Z RawRho 2 types subcommunity 3 3.0
Diversity.DiversityModule
Diversity package

The main Diversity package provides basic numbers-equivalent diversity measures (described in Hill, 1973), similarity-sensitive diversity measures (generalised from Hill, and described in Leinster and Cobbold, 2012), and related alpha, beta and gamma diversity measures at the level of the metacommunity and its component subcommunities (generalised in turn from Leinster and Cobbold, and described in Reeve et al, 2014). The diversity functions exist both with unicode names (e.g. ᾱ()), which are not automatically exported (as we feel they are too short) and with matching longer ASCII names (e.g. NormalisedAlpha()), which are. We also provide functions to calculate appropriate subcommunityDiversity() and metacommunityDiversity() values for each measure, a general diversity() function for extract any diversity measure at a series of scales.

source
Diversity.individualDiversityConstant

Generates the function to calculate individual diversities

Generates the function to calculate individual diversities for a series of orders, represented as a vector of qs.

Arguments:

  • dm: DiversityMeasure

Returns:

  • Function which takes a single number or vector of values of parameter q, and returns the individual diversities for those values.
source
Diversity.metacommunityDiversityConstant

Generates the function to calculate metacommunity diversity

Generates the function to calculate metacommunity diversity for a series of orders, represented as a vector of qs.

Arguments:

  • dm: DiversityMeasure

Returns:

  • Function which takes a single number or vector of values of parameter q, and returns the metacommunity diversities for those values.
source
Diversity.subcommunityDiversityConstant

Generates the function to calculate subcommunity diversity

Generates the function to calculate subcommunity diversity for a series of orders, represented as a vector of qs.

Arguments:

  • dm: DiversityMeasure

Returns:

  • Function which takes a single number or vector of values of parameter q, and returns the subcommunity diversities for those values.
source
Diversity.DiversityLevelType

Enumeration of levels that can exist / be calculated for a metacommunity.

source
Diversity.DiversityMeasureType
DiversityMeasure

This type is the abstract supertype of all diversity measure types. DiversityMeasure subtypes allow you to calculate and cache any kind of diversity of a metacommunity.

source
Diversity.GammaType
Gamma

Calculates gamma diversity (γ) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.GeneralTypesType
GeneralTypes{FP, M, LABELS}

An AbstractTypes subtype with a general similarity matrix. This subtype simply holds a matrix with similarities between individuals.

Members:

  • z A two-dimensional matrix representing similarity between

individuals.

  • names Vector of type names.
source
Diversity.GeneralTypesMethod
GeneralTypes(zmatrix::M)
-GeneralTypes(zmatrix::M, names::LABELS)

Constructors for GeneralTypes. Creates an instance of the GeneralTypes class, with an arbitrary zmatrix similarity matrix and an optional vector of type names.

source
Diversity.MetacommunityType
Metacommunity{FP, ARaw, AProcessed, Part, Sim}

Metacommunity type, representing a whole metacommunity containing a single community or a collection of subcommunities. The metacommunity of individuals may be further partitioned into smaller groups. For instance this may be an ecosystem, which consists of a series of subcommunities. The AbstractPartition subtype within it stores relative abundances of different types, e.g. species, and also allows for similarity between individuals.

Constructor:

Metacommunity(abundances::AbstractArray, part::AbstractPartition, types::AbstractTypes)

Members:

  • abundances the abundance matrix for the metacommunity.

  • partition the instance of the AbstractPartition subtype, containing the subcommunities.

  • types The instance of the AbstractTypes subtype, from which similarities between individuals can be calculated.

  • ordinariness A cache of the ordinariness of the individuals in the Partition. Should only be accessed through getordinariness!(::Metacommunity), which will populate the cache if it has not yet been calculated.

source
Diversity.NormalisedAlphaType
NormalisedAlpha

Calculates normalised alpha diversity (ᾱ) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.NormalisedBetaType
NormalisedBeta

Calculates normalised beta diversity (β̄) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of RelativeEntropyMeasure, meaning that subcommunity and type composite diversity measures are relative entropies, and their composite types are powermeans of those measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.NormalisedRhoType
NormalisedRho

Calculates redundancy (ρ̄, normalised beta diversity) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.OnecommunityType
Onecommunity

AbstractPartition subtype containing only one subcommunity.

source
Diversity.PowerMeanMeasureType
PowerMeanMeasure

This abstract DiversityMeasure subtype is the supertype of all diversity measures which are straight power means. PowerMeanMeasure subtypes allow you to calculate and cache any kind of diversity of a metacommunity.

source
Diversity.RawAlphaType
RawAlpha

Calculates raw alpha diversity (α) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.RawBetaType
RawBeta

Calculates distinctiveness (β, raw beta diversity) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of RelativeEntropyMeasure, meaning that subcommunity and type composite diversity measures are relative entropies, and their composite types are powermeans of those measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.RawRhoType
RawRho

Calculates redundancy (ρ, raw beta diversity) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.RelativeEntropyMeasureType
RelativeEntropyMeasure

This abstract DiversityMeasure subtype is the supertype of all diversity measures which are relative entropy-based diversity measures. RelativeEntropyMeasure subtypes allow you to calculate and cache any kind of diversity of a metacommunity.

source
Diversity.SpeciesType
Species

A subtype of AbstractTypes where all species are completely distinct. This type is the simplest AbstractTypes subtype, which identifies all species as unique and completely distinct from each other.

source
Diversity.SubcommunitiesType
Subcommunities(num)

AbstractPartition subtype with multiple subcommunities.

source
Diversity.TaxonomyType
Taxonomy

A subtype of AbstractTypes with similarity between related taxa, creating taxonomic similarity matrices.

source
Diversity.UniqueTypesType
UniqueTypes

A subtype of AbstractTypes where all individuals are completely distinct. This type is the simplest AbstractTypes subtype, which identifies all individuals as unique and completely distinct from each other.

source
Diversity.addedoutputcolsFunction
addedoutputcols(m::AbstractAssemblage)
-addedoutputcols(t::AbstractTypes)

Returns the name of any additional columns needed to disambiguate the diversity type used.

source
Diversity.calcsimilarityMethod
calcsimilarity(t::AbstractTypes, scale::Real)

Retrieves (and possibly calculates) a similarity matrix from t.

source
Diversity.countsubcommunitiesFunction
countsubcommunities(m::AbstractAssemblage)
-countsubcommunities(p::AbstractPartition)

Returns number of subcommunities in an AbstractPartition object or the AbstractAssemblage containing it.

source
Diversity.counttypesFunction
counttypes(m::AbstractAssemblage[, raw::Bool = false])
-counttypes(t::AbstractTypes[, raw::Bool = false])

Returns number of types in an AbstractTypes object or the AbstractAssemblage containing it. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny.

source
Diversity.diversityMethod

Calculates subcommunity and metacommunity diversities

Calculates any diversity of a Metacommunity for a series of orders, repesented as one or a vector of qs.

Arguments:

  • dls: an iterable collection of DiversityLevels
  • dms: an iterable collection of DiversityMeasures
  • meta: a Metacommunity
  • qs: single number or vector of values of parameter q

Returns:

A vector containing all of the diversity levels of all of the requested diversities.

source
Diversity.getASCIINameMethod
getASCIIName(dm::DiversityMeasure)

Return the ASCII name of the DiversityMeasure

Arguments:

  • dm: DiversityMeasure

Returns:

  • String containing simple ASCII name of DiversityMeasure
source
Diversity.getFullNameFunction
getFullName(dm::DiversityMeasure)

Return the full name of the DiversityMeasure.

Arguments:

  • dm: DiversityMeasure

Returns:

  • String containing full descriptive name of DiversityMeasure
source
Diversity.getNameFunction
getName(dm::DiversityMeasure)

Return the character corresponding to the DiversityMeasure.

Arguments:

  • dm: DiversityMeasure

Returns:

  • String containing unicode (greek) name of DiversityMeasure.
source
Diversity.getabundanceFunction
getabundance(m::AbstractAssemblage, raw::Bool)

Returns the abundances array of the metacommunity.

source
Diversity.getaddedoutputFunction
getaddedoutput(::AbstractTypes)

Returns the contents of any additional columns to be added to outputs.

source
Diversity.getdiversitynameFunction
getdiversityname(m::AbstractAssemblage)
-getdiversityname(t::AbstractTypes)

Returns the name of the diversity type used.

source
Diversity.getmetaabundanceFunction
getmetaabundance(m::AbstractAssemblage)

Returns the metacommunity abundances of the metacommunity.

source
Diversity.getmetaordinariness!Method
getmetaordinariness!(m::AbstractAssemblage)

Returns (and possibly calculates) the ordinariness of the metacommunity as a whole.

source
Diversity.getordinariness!Method
getordinariness!(m::AbstractAssemblage)

Returns (and possibly calculates) the ordinariness array of the subcommunities.

source
Diversity.getpartitionMethod
getpartition(m::AbstractAssemblage)

Returns the AbstractPartition component of the metacommunity.

source
Diversity.getsubcommunitynamesFunction
getsubcommunitynames(m::AbstractAssemblage)
-getsubcommunitynames(p::AbstractPartition)

Returns the names of the subcommunities in an AbstractPartition object or the AbstractAssemblage containing it.

source
Diversity.gettypenamesFunction
gettypenames(m::AbstractAssemblage[, raw::Bool = false])
-gettypenames(t::AbstractTypes[, raw::Bool = false])

Returns the names of the types of the AbstractTypes object or the AbstractAssemblage containing it. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny.

source
Diversity.gettypesMethod
gettypes(m::AbstractAssemblage)

Returns the AbstractTypes component of the metacommunity.

source
Diversity.getweightMethod
getweight(m::AbstractAssemblage)

Returns the subcommunity weights of the metacommunity.

source
Diversity.hassimilarityFunction
hassimilarity(t::AbstractAssemblage)
-hassimilarity(t::AbstractThings)

Is there similarity of some non-trivial type in the object?

source
Diversity.inddivFunction
inddiv(measure::DiversityMeasure, q::Real)
-inddiv(measure::DiversityMeasure, qs::AbstractVector{Real})

Takes a diversity measure and single order or vector of orders, and returns a DataFrame containing the individual diversities for those values.

Arguments:

  • dm: DiversityMeasure
  • q / qs: a single order or a vector of orders

Returns:

  • Returns individual diversities of dm for a single order q or a vector of order qs.
source
Diversity.metadivFunction
metadiv(measure::DiversityMeasure, q::Real)
-metadiv(measure::DiversityMeasure, qs::AbstractVector{Real})

Takes a diversity measure and single order or vector of orders, and calculates and returns the metacommunity diversities for those values.

Arguments:

  • dm: DiversityMeasure
  • q / qs: a single order or a vector of orders

Returns:

  • Returns metacommunity diversities of dm for a single order q or a vector of order qs.
source
Diversity.qDFunction
qD

Calculates Hill / naive-similarity diversity of order(s) qs of a population with given relative proportions.

Arguments:

  • proportions: relative proportions of different types in population

  • qs: single number or vector of orders of diversity measurement

Returns:

  • Diversity of order qs (single number or vector of diversities)
source
Diversity.qDZFunction
qDZ

Calculates Leinster-Cobbold / similarity-sensitive diversity of >= 1 order(s) qs of a population with given relative proportions, and similarity matrix Z.

Arguments:

  • proportions: relative proportions of different types in a population

  • qs: single number or vector of orders of diversity measurement

  • Z: similarity matrix

Returns:

  • Diversity of order qs (single number or vector of diversities)

source
Diversity.subdivFunction
subdiv(measure::DiversityMeasure, q::Real)
-subdiv(measure::DiversityMeasure, qs::AbstractVector{Real})

Takes a diversity measure and single order or vector of orders, and calculates and returns the subcommunity diversities for those values.

Arguments:

  • dm: DiversityMeasure
  • q / qs: a single order or a vector of orders

Returns:

  • Returns subcommunity diversities of dm for a single order q or a vector of order qs.
source
Diversity.ShortNamesModule
Diversity.ShortNames submodule

We do not directly export ᾱ, α, β̄, β, ρ̄, ρ, γ as they're too short. γ actually can't be exported like this - it'll always just be Shortnames.γ, so we export Γ instead.

All of these can only be accessed via Diversity.ShortNames.

source

Private functions in module Diversity:

Diversity._getmetaMethod
_getmeta(dm::DiversityMeasure)

Return the metacommunity belonging to the DiversityMeasure.

source
Diversity.powermeanFunction
powermean

Calculates the weighted powermean of a series of numbers

Calculates orderth power mean of values, weighted by weights. By default, weights are equal and order is 1, so this is just the arithmetic mean.

Arguments:

  • values: values for which to calculate mean
  • order[s]: order[s] of power mean
  • weights: weights of elements, normalised to 1 inside function

Returns:

  • weighted power mean(s)
source
+ 3 │ Arbitrary Z RawRho 2 types subcommunity 3 3.0
Diversity.DiversityModule
Diversity package

The main Diversity package provides basic numbers-equivalent diversity measures (described in Hill, 1973), similarity-sensitive diversity measures (generalised from Hill, and described in Leinster and Cobbold, 2012), and related alpha, beta and gamma diversity measures at the level of the metacommunity and its component subcommunities (generalised in turn from Leinster and Cobbold, and described in Reeve et al, 2014). The diversity functions exist both with unicode names (e.g. ᾱ()), which are not automatically exported (as we feel they are too short) and with matching longer ASCII names (e.g. NormalisedAlpha()), which are. We also provide functions to calculate appropriate subcommunityDiversity() and metacommunityDiversity() values for each measure, a general diversity() function for extract any diversity measure at a series of scales.

source
Diversity.individualDiversityConstant

Generates the function to calculate individual diversities

Generates the function to calculate individual diversities for a series of orders, represented as a vector of qs.

Arguments:

  • dm: DiversityMeasure

Returns:

  • Function which takes a single number or vector of values of parameter q, and returns the individual diversities for those values.
source
Diversity.metacommunityDiversityConstant

Generates the function to calculate metacommunity diversity

Generates the function to calculate metacommunity diversity for a series of orders, represented as a vector of qs.

Arguments:

  • dm: DiversityMeasure

Returns:

  • Function which takes a single number or vector of values of parameter q, and returns the metacommunity diversities for those values.
source
Diversity.subcommunityDiversityConstant

Generates the function to calculate subcommunity diversity

Generates the function to calculate subcommunity diversity for a series of orders, represented as a vector of qs.

Arguments:

  • dm: DiversityMeasure

Returns:

  • Function which takes a single number or vector of values of parameter q, and returns the subcommunity diversities for those values.
source
Diversity.DiversityLevelType

Enumeration of levels that can exist / be calculated for a metacommunity.

source
Diversity.DiversityMeasureType
DiversityMeasure

This type is the abstract supertype of all diversity measure types. DiversityMeasure subtypes allow you to calculate and cache any kind of diversity of a metacommunity.

source
Diversity.GammaType
Gamma

Calculates gamma diversity (γ) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.GeneralTypesType
GeneralTypes{FP, M, LABELS}

An AbstractTypes subtype with a general similarity matrix. This subtype simply holds a matrix with similarities between individuals.

Members:

  • z A two-dimensional matrix representing similarity between

individuals.

  • names Vector of type names.
source
Diversity.GeneralTypesMethod
GeneralTypes(zmatrix::M)
+GeneralTypes(zmatrix::M, names::LABELS)

Constructors for GeneralTypes. Creates an instance of the GeneralTypes class, with an arbitrary zmatrix similarity matrix and an optional vector of type names.

source
Diversity.MetacommunityType
Metacommunity{FP, ARaw, AProcessed, Part, Sim}

Metacommunity type, representing a whole metacommunity containing a single community or a collection of subcommunities. The metacommunity of individuals may be further partitioned into smaller groups. For instance this may be an ecosystem, which consists of a series of subcommunities. The AbstractPartition subtype within it stores relative abundances of different types, e.g. species, and also allows for similarity between individuals.

Constructor:

Metacommunity(abundances::AbstractArray, part::AbstractPartition, types::AbstractTypes)

Members:

  • abundances the abundance matrix for the metacommunity.

  • partition the instance of the AbstractPartition subtype, containing the subcommunities.

  • types The instance of the AbstractTypes subtype, from which similarities between individuals can be calculated.

  • ordinariness A cache of the ordinariness of the individuals in the Partition. Should only be accessed through getordinariness!(::Metacommunity), which will populate the cache if it has not yet been calculated.

source
Diversity.NormalisedAlphaType
NormalisedAlpha

Calculates normalised alpha diversity (ᾱ) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.NormalisedBetaType
NormalisedBeta

Calculates normalised beta diversity (β̄) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of RelativeEntropyMeasure, meaning that subcommunity and type composite diversity measures are relative entropies, and their composite types are powermeans of those measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.NormalisedRhoType
NormalisedRho

Calculates redundancy (ρ̄, normalised beta diversity) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.OnecommunityType
Onecommunity

AbstractPartition subtype containing only one subcommunity.

source
Diversity.PowerMeanMeasureType
PowerMeanMeasure

This abstract DiversityMeasure subtype is the supertype of all diversity measures which are straight power means. PowerMeanMeasure subtypes allow you to calculate and cache any kind of diversity of a metacommunity.

source
Diversity.RawAlphaType
RawAlpha

Calculates raw alpha diversity (α) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.RawBetaType
RawBeta

Calculates distinctiveness (β, raw beta diversity) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of RelativeEntropyMeasure, meaning that subcommunity and type composite diversity measures are relative entropies, and their composite types are powermeans of those measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.RawRhoType
RawRho

Calculates redundancy (ρ, raw beta diversity) of all of the individuals in a metacommunity, and caches them for subsequent analysis. This is a subtype of PowerMeanMeasure, meaning that all composite diversity measures are simple powermeans of the individual measures.

Constructor arguments:

  • meta: a Metacommunity
source
Diversity.RelativeEntropyMeasureType
RelativeEntropyMeasure

This abstract DiversityMeasure subtype is the supertype of all diversity measures which are relative entropy-based diversity measures. RelativeEntropyMeasure subtypes allow you to calculate and cache any kind of diversity of a metacommunity.

source
Diversity.SpeciesType
Species

A subtype of AbstractTypes where all species are completely distinct. This type is the simplest AbstractTypes subtype, which identifies all species as unique and completely distinct from each other.

source
Diversity.SubcommunitiesType
Subcommunities(num)

AbstractPartition subtype with multiple subcommunities.

source
Diversity.TaxonomyType
Taxonomy

A subtype of AbstractTypes with similarity between related taxa, creating taxonomic similarity matrices.

source
Diversity.UniqueTypesType
UniqueTypes

A subtype of AbstractTypes where all individuals are completely distinct. This type is the simplest AbstractTypes subtype, which identifies all individuals as unique and completely distinct from each other.

source
Diversity.addedoutputcolsFunction
addedoutputcols(m::AbstractAssemblage)
+addedoutputcols(t::AbstractTypes)

Returns the name of any additional columns needed to disambiguate the diversity type used.

source
Diversity.calcsimilarityMethod
calcsimilarity(t::AbstractTypes, scale::Real)

Retrieves (and possibly calculates) a similarity matrix from t.

source
Diversity.countsubcommunitiesFunction
countsubcommunities(m::AbstractAssemblage)
+countsubcommunities(p::AbstractPartition)

Returns number of subcommunities in an AbstractPartition object or the AbstractAssemblage containing it.

source
Diversity.counttypesFunction
counttypes(m::AbstractAssemblage[, raw::Bool = false])
+counttypes(t::AbstractTypes[, raw::Bool = false])

Returns number of types in an AbstractTypes object or the AbstractAssemblage containing it. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny.

source
Diversity.diversityMethod

Calculates subcommunity and metacommunity diversities

Calculates any diversity of a Metacommunity for a series of orders, repesented as one or a vector of qs.

Arguments:

  • dls: an iterable collection of DiversityLevels
  • dms: an iterable collection of DiversityMeasures
  • meta: a Metacommunity
  • qs: single number or vector of values of parameter q

Returns:

A vector containing all of the diversity levels of all of the requested diversities.

source
Diversity.getASCIINameMethod
getASCIIName(dm::DiversityMeasure)

Return the ASCII name of the DiversityMeasure

Arguments:

  • dm: DiversityMeasure

Returns:

  • String containing simple ASCII name of DiversityMeasure
source
Diversity.getFullNameFunction
getFullName(dm::DiversityMeasure)

Return the full name of the DiversityMeasure.

Arguments:

  • dm: DiversityMeasure

Returns:

  • String containing full descriptive name of DiversityMeasure
source
Diversity.getNameFunction
getName(dm::DiversityMeasure)

Return the character corresponding to the DiversityMeasure.

Arguments:

  • dm: DiversityMeasure

Returns:

  • String containing unicode (greek) name of DiversityMeasure.
source
Diversity.getabundanceFunction
getabundance(m::AbstractAssemblage, raw::Bool)

Returns the abundances array of the metacommunity.

source
Diversity.getaddedoutputFunction
getaddedoutput(::AbstractTypes)

Returns the contents of any additional columns to be added to outputs.

source
Diversity.getdiversitynameFunction
getdiversityname(m::AbstractAssemblage)
+getdiversityname(t::AbstractTypes)

Returns the name of the diversity type used.

source
Diversity.getmetaabundanceFunction
getmetaabundance(m::AbstractAssemblage)

Returns the metacommunity abundances of the metacommunity.

source
Diversity.getmetaordinariness!Method
getmetaordinariness!(m::AbstractAssemblage)

Returns (and possibly calculates) the ordinariness of the metacommunity as a whole.

source
Diversity.getordinariness!Method
getordinariness!(m::AbstractAssemblage)

Returns (and possibly calculates) the ordinariness array of the subcommunities.

source
Diversity.getpartitionMethod
getpartition(m::AbstractAssemblage)

Returns the AbstractPartition component of the metacommunity.

source
Diversity.getsubcommunitynamesFunction
getsubcommunitynames(m::AbstractAssemblage)
+getsubcommunitynames(p::AbstractPartition)

Returns the names of the subcommunities in an AbstractPartition object or the AbstractAssemblage containing it.

source
Diversity.gettypenamesFunction
gettypenames(m::AbstractAssemblage[, raw::Bool = false])
+gettypenames(t::AbstractTypes[, raw::Bool = false])

Returns the names of the types of the AbstractTypes object or the AbstractAssemblage containing it. raw determines whether to count the number of raw or processed types, which varies, for instance, when the types are determined by a phylogeny.

source
Diversity.gettypesMethod
gettypes(m::AbstractAssemblage)

Returns the AbstractTypes component of the metacommunity.

source
Diversity.getweightMethod
getweight(m::AbstractAssemblage)

Returns the subcommunity weights of the metacommunity.

source
Diversity.hassimilarityFunction
hassimilarity(t::AbstractAssemblage)
+hassimilarity(t::AbstractThings)

Is there similarity of some non-trivial type in the object?

source
Diversity.inddivFunction
inddiv(measure::DiversityMeasure, q::Real)
+inddiv(measure::DiversityMeasure, qs::AbstractVector{Real})

Takes a diversity measure and single order or vector of orders, and returns a DataFrame containing the individual diversities for those values.

Arguments:

  • dm: DiversityMeasure
  • q / qs: a single order or a vector of orders

Returns:

  • Returns individual diversities of dm for a single order q or a vector of order qs.
source
Diversity.metadivFunction
metadiv(measure::DiversityMeasure, q::Real)
+metadiv(measure::DiversityMeasure, qs::AbstractVector{Real})

Takes a diversity measure and single order or vector of orders, and calculates and returns the metacommunity diversities for those values.

Arguments:

  • dm: DiversityMeasure
  • q / qs: a single order or a vector of orders

Returns:

  • Returns metacommunity diversities of dm for a single order q or a vector of order qs.
source
Diversity.qDFunction
qD

Calculates Hill / naive-similarity diversity of order(s) qs of a population with given relative proportions.

Arguments:

  • proportions: relative proportions of different types in population

  • qs: single number or vector of orders of diversity measurement

Returns:

  • Diversity of order qs (single number or vector of diversities)
source
Diversity.qDZFunction
qDZ

Calculates Leinster-Cobbold / similarity-sensitive diversity of >= 1 order(s) qs of a population with given relative proportions, and similarity matrix Z.

Arguments:

  • proportions: relative proportions of different types in a population

  • qs: single number or vector of orders of diversity measurement

  • Z: similarity matrix

Returns:

  • Diversity of order qs (single number or vector of diversities)

source
Diversity.subdivFunction
subdiv(measure::DiversityMeasure, q::Real)
+subdiv(measure::DiversityMeasure, qs::AbstractVector{Real})

Takes a diversity measure and single order or vector of orders, and calculates and returns the subcommunity diversities for those values.

Arguments:

  • dm: DiversityMeasure
  • q / qs: a single order or a vector of orders

Returns:

  • Returns subcommunity diversities of dm for a single order q or a vector of order qs.
source
Diversity.ShortNamesModule
Diversity.ShortNames submodule

We do not directly export ᾱ, α, β̄, β, ρ̄, ρ, γ as they're too short. γ actually can't be exported like this - it'll always just be Shortnames.γ, so we export Γ instead.

All of these can only be accessed via Diversity.ShortNames.

source

Private functions in module Diversity:

Diversity._getmetaMethod
_getmeta(dm::DiversityMeasure)

Return the metacommunity belonging to the DiversityMeasure.

source
Diversity.powermeanFunction
powermean

Calculates the weighted powermean of a series of numbers

Calculates orderth power mean of values, weighted by weights. By default, weights are equal and order is 1, so this is just the arithmetic mean.

Arguments:

  • values: values for which to calculate mean
  • order[s]: order[s] of power mean
  • weights: weights of elements, normalised to 1 inside function

Returns:

  • weighted power mean(s)
source
diff --git a/dev/jost/index.html b/dev/jost/index.html index 13a6742..1a4fe0a 100644 --- a/dev/jost/index.html +++ b/dev/jost/index.html @@ -12,4 +12,4 @@ ─────┼────────────────────────────────────────────────────────────────────────────────────────────── 1 │ Unique JostBeta 0 types metacommunity 1.5 2 │ Unique JostBeta 1 types metacommunity 1.41421 - 3 │ Unique JostBeta 2 types metacommunity 1.33333
Diversity.JostModule
Diversity.Jost submodule

Lou Jost's diversity measures are found in the Diversity.Jost module.

source
Diversity.Jost.jostalphaMethod
jostalpha(proportions::AbstractMatrix, qs)

Calculates Jost's alpha 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-community ecosystem diversity divided by the naive-community beta diversity.

Arguments:

  • proportions relative proportions of different individuals / species in population (vector, or matrix where columns are for individual sub-communities)

  • qs single number or vector of orders of diversity measurement

Returns:

  • DataFrame of diversities
source
Diversity.Jost.jostbetaMethod
jostbeta(proportions::AbstractMatrix, qs)

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 Jost's alpha diversity

Arguments:

  • proportions relative proportions of different individuals / species in population (vector, or matrix where columns are for individual sub-communities)

  • qs single number or vector of orders of diversity measurement

Returns:

  • DataFrame of diversities
source
+ 3 │ Unique JostBeta 2 types metacommunity 1.33333
Diversity.JostModule
Diversity.Jost submodule

Lou Jost's diversity measures are found in the Diversity.Jost module.

source
Diversity.Jost.jostalphaMethod
jostalpha(proportions::AbstractMatrix, qs)

Calculates Jost's alpha 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-community ecosystem diversity divided by the naive-community beta diversity.

Arguments:

  • proportions relative proportions of different individuals / species in population (vector, or matrix where columns are for individual sub-communities)

  • qs single number or vector of orders of diversity measurement

Returns:

  • DataFrame of diversities
source
Diversity.Jost.jostbetaMethod
jostbeta(proportions::AbstractMatrix, qs)

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 Jost's alpha diversity

Arguments:

  • proportions relative proportions of different individuals / species in population (vector, or matrix where columns are for individual sub-communities)

  • qs single number or vector of orders of diversity measurement

Returns:

  • DataFrame of diversities
source
diff --git a/dev/phylogenetics/index.html b/dev/phylogenetics/index.html index 4298abf..2428a0b 100644 --- a/dev/phylogenetics/index.html +++ b/dev/phylogenetics/index.html @@ -40,4 +40,4 @@ │ Row │ div_type │ measure │ q │ type_level │ type_name │ partition_level │ partition_name │ diversity │ │ │ String │ String │ Int64 │ String │ String │ String │ String │ Float64 │ ├─────┼─────────────────────┼─────────┼───────┼────────────┼───────────┼─────────────────┼────────────────┼───────────┤ -│ 1 │ Phylogenetic Branch │ Gamma │ 0 │ types │ │ metacommunity │ │ 3.48192 │ +│ 1 │ Phylogenetic Branch │ Gamma │ 0 │ types │ │ metacommunity │ │ 3.48192 │