View source: R/generalized_Tradidiss.R
generalized_Tradidiss | R Documentation |
Given a matrix of S species' relative or absolute abundance values in N plots, together with an S x S (functional) dissimilarity matrix, the function generalized_Tradidiss
calculates a semimatrix with the values of a plot-to-plot dissimilarity index, as proposed in Pavoine and Ricotta (2019).
generalized_Tradidiss(comm, dis, method = c("GC", "MS", "PE"), abundance = c("relative", "absolute", "none"), weights = c("uneven", "even"), tol = 1e-8)
comm |
a data frame typically with communities as rows, species as columns and an index of abundance as entries. Species must be labeled as in the object |
dis |
an object of class |
method |
one of the following strings: |
abundance |
a string with three possible values: "relative" for the use of relative species abundance, "absolute" for the use of absolute species abundance, and "none" for the use of presence/absence data (1/0). |
weights |
a string. Two types of weights are available in the function: |
tol |
numeric tolerance threshold: values between - |
The plot-to-plot dissimilarity coefficients used in this function are as follows:
"GC"
: Equation 6 in Pavoine and Ricotta (2019)
"MS"
: Equation 8 in Pavoine and Ricotta (2019)
"PE"
: Equations 9 and 10 in Pavoine and Ricotta (2019)
The function returns an object of class "dist"
with the values of the proposed dissimilarities for each pair of plots.
Sandrine Pavoine sandrine.pavoine@mnhn.fr
Pavoine, S. and Ricotta, C. (2019) Measuring functional dissimilarity among plots: adapting old methods to new questions. Ecological Indicators, 97, 67–72.
## Not run: if(require(ade4) && require(adephylo) && require(ape)){ data(birdData) phy <- read.tree(text=birdData$tre) phydis <- sqrt(distTips(phy, method="nNodes")+1) fau <- birdData$fau[1:6, phy$tip.label] disGC <- generalized_Tradidiss(fau, phydis, method="GC") disGC ### The second example is a bit TIME CONSUMING data(mafragh) namspe <- rownames(mafragh$traits[[1]]) M <- mafragh$flo colnames(M) <- namspe Bin <- prep.binary(mafragh$traits$tabBinary, c(3, 4)) distraits <- dist.ktab(ktab.list.df(list(mafragh$traits$tabOrdinal[,2:3], Bin)), c("O","B"), scan=FALSE) disGC <- generalized_Tradidiss(M, distraits, method="GC") pcoGC <- dudi.pco(as.dist(cailliez(disGC)), full=TRUE) s.value(mafragh$xy, pcoGC$li[,1]) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.