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 dist, giving the FP-dissimilarities between species, or inheriting the class phylo (see package ape), phylo4 (see package phylobase), or hclust, where species are tips.

method

a string either "KY" for index ^{\alpha}K (if disORtree is of class dist) or ^{\alpha}Y if disORtree is of class phylo, phylo4 or hclust; or "KstarI" for index ^{\alpha}K* (if disORtree is of class dist) or ^{\alpha}I if disORtree is of class phylo, phylo4 or hclust. If several values are given, only the first one is considered.

palpha

a vector with nonnegative value(s) for parameter \alpha.

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 "asymmetric" or "symmetric". The parameter option is only used if disORtree is of class phylo, phylo4 or hclust If option="symmetric", the distance between two tips on a tree is defined as half the sum of branch length on the smallest path that connects the two species; while if option="asymmetric" the distance between a tip i and a tip j on a tree is defined as the sum of branch lengths between tip i and its most recent ancestor with tip j. If the tree is ultrametric, the two options are equivalent.

dmax

a nonnegative numeric indicating the maximum possible dissimilarity between two species. dmax must be higher than or equal to the maximum observed dissimilarity between two species.

tol

a numeric tolerance threshold: values between -tol and tol are considered equal to zero.

x

an object of class FPdivparam obtained with function FPdivparam.

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 legend of the base of R.

axisLABEL

a string to display on the main axis of the plot to designate what we are measuring. The default is "FP-diversity".

type

a string to be passed to the graphic argument type of functions plot and lines used to draw the diversity curve of each community.

col

vector of colours to be passed to the graphic argument col of functions plot and lines to define the colour of the diversity curve of each community.

lty

vector of type of line (plain, broken etc.) to be passed to the graphic argument lty of functions plot and lines used to draw the diversity curve of each community.

pch

type of point (open circle, close circle, square etc.) to be passed to the graphic argument pch of functions plot and lines used to draw the diversity level of each community.

...

other arguments can be added and passed to the functions plot and lines used to draw the graphic.

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 palpha;

div

a data frame with the phylogenetic diversity of each community calculated for all values of palpha.

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

pIa, evodivparam

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)

[Package adiv version 2.2.1 Index]