FPdivparam {adiv} | R Documentation |
Parametric Indices of Functional and Phylogenetic Diversity
Description
Function FPivparam
calculates functional or phylogenetic (FP-)diversity in communities using parametric indices ^{\alpha}K
, ^{\alpha}K*
, ^{\alpha}Y
and ^{\alpha}I
discussed and developed in Pavoine and Ricotta (2021).
The function plot.FPdivparam
plots the results of function FPdivparam
.
Usage
FPdivparam(comm, disORtree, method = c("KY", "KstarI"), palpha = 2,
equivalent = FALSE, option = c("asymmetric", "symmetric"),
dmax = NULL, tol = 1e-8)
## S3 method for class 'FPdivparam'
plot(x, legend = TRUE,
legendposi = "topright", axisLABEL = "FP-diversity",
type="b", col = if(is.numeric(x)) NULL
else sample(colors(distinct = TRUE), nrow(x$div)),
lty = if(is.numeric(x)) NULL else rep(1, nrow(x$div)),
pch = if(is.numeric(x)) NULL else rep(19, nrow(x$div)),
...)
Arguments
comm |
a data frame or a matrix typically with communities as rows, species as columns and abundance as entry. Species should be labelled as in object disORtree. |
disORtree |
an object inheriting the class |
method |
a string either |
palpha |
a vector with nonnegative value(s) for parameter |
equivalent |
a logical. If TRUE, the diversity values are calculated in terms of equivalent number of species (see Pavoine and Ricotta, 2021). |
option |
a string either |
dmax |
a nonnegative numeric indicating the maximum possible dissimilarity between two species. |
tol |
a numeric tolerance threshold: values between - |
x |
an object of class |
legend |
a logical. If TRUE a legend is given with the colour, the type of line (etc.) used to define the diversity curve of each community. |
legendposi |
a string that gives the position of the legend to be passed to function |
axisLABEL |
a string to display on the main axis of the plot to designate what we are measuring. The default is |
type |
a string to be passed to the graphic argument |
col |
vector of colours to be passed to the graphic argument |
lty |
vector of type of line (plain, broken etc.) to be passed to the graphic argument |
pch |
type of point (open circle, close circle, square etc.) to be passed to the graphic argument |
... |
other arguments can be added and passed to the functions |
Value
If only one value of palpha
is given, function FPdivparam
returns a vector with the phylogenetic diversity of each community.
If more than one value of palpha
is given, a list of two objects is returned:
palpha |
the vector of values for |
div |
a data frame with the phylogenetic diversity of each community calculated for all values of |
The function plot.FPdivparam
returns a graphic.
Author(s)
Sandrine Pavoine sandrine.pavoine@mnhn.fr
References
The methodologies and scripts were developed by
Pavoine, S., Ricotta, C. (2021) On the relationships between rarity, uniqueness, distinctiveness, originality and functional/phylogenetic diversity. BiorXiv. doi:10.1101/2021.08.09.455640
unifying and extending earlier work by:
Pavoine, S., Love, M., Bonsall, M. (2009) Hierarchical partitioning of evolutionary and ecological patterns in the organization of phylogenetically-structured species assemblages: application to rockfish (genus: Sebastes) in the Southern California Bight. Ecology Letters, 12, 898–908.
and
Ricotta, C., Szeidl, L. (2006) Towards a unifying approach to diversity measures: Bridging the gap between the Shannon entropy and Rao's quadratic index. Theoretical Population Biology, 70, 237–243.
See Also
Examples
## Not run:
if(require(ape)){
data(batcomm)
phy2 <- read.tree(text=batcomm$tre2)
ab2 <- batcomm$ab2[, phy2$tip.label]
plot(FPdivparam(ab2, phy2))
plot(FPdivparam(ab2, phy2, palpha=seq(0, 10, length=20)))
}
## End(Not run)