rlqESLTP {adiv} | R Documentation |
Linking Patterns in Phylogeny, Traits, Abiotic Variables and Space
Description
An extention of the RLQ approach to identify potential environmental filters in species' traits in a phylogenetic and spatial context.
Usage
rlqESLTP(dudiE, dudiS, dudiL, dudiT, dudiP, ...)
## S3 method for class 'rlqESLTP'
plot(x, which = NULL, phyl = NULL,
xy = NULL, traits = NULL, env = NULL, type = NULL,
ax = 1, disp = c("dots", "bars", "grid"), ...)
## S3 method for class 'rlqESLTP'
summary(object, ...)
Arguments
dudiE |
an object of class |
dudiS |
an object of class |
dudiL |
an object of class |
dudiT |
an object of class |
dudiP |
an object of class |
x |
an object of class |
object |
an object of class |
which |
a character that might be |
phyl |
an object inheriting the class |
xy |
a data frame with two columns giving the coordinates of the plots (longitude, latitude in that order). |
traits |
a list of data frames for the traits, each data frame contains variables from a single statistical type (see argument |
env |
a list of data frames for the environmental variables, each data frame contains variables from a single statistical type (see argument |
type |
a vector that provides the type of each table to be analysed in |
ax |
a numeric indicating the axis of interest. |
disp |
a string indicating which method to use to display species scores in front of the phylogeny: one of |
... |
further arguments passed to or from other methods. |
Value
Function rlqESLTP
returns an object of classes rlqESLTP
, rlq
and dudi
.
It is a list of 26 objects:
tab |
a data frame. Crossed Table (CT): crossing the columns of the merged trait and phylogenetic table with those of the merged environmental and spatial table. |
cw |
a vector of numerics. Weights attributed to the columns of the merged trait and phylogenetic table. |
lw |
a vector of numerics. weights attributed to the columns of the merged environmental and spatial table. |
eig |
a vector of numerics. The vector of eigenvalues. |
rank |
an integer. The total number of axes in the analysis. |
nf |
a numeric. The number of axes kept. |
c1 |
a data frame. Principal axes. Normed scores for the columns of merged trait and phylogenetic table. |
co |
a data frame. Scores for the columns of merged trait and phylogenetic table. |
l1 |
a data frame. Principal axes. Normed scores for the columns of merged environmental and spatial table. |
li |
a data frame. Scores for the columns of merged environmental and spatial table. |
call |
call |
lQ |
data frame. Scores for the species. |
mQ |
data frame. Normed scores for the species. |
lR |
data frame. Scores of the plots. |
mR |
data frame. Normed scores for the plots. |
aQ |
data frame. Correlations trait/phylogeny axes / coinertia axes. |
aR |
data frame. Correlations environment/space axes / coinertia axes. |
lR_givenE |
data frame. Contributions of environmental information to plot scores. |
lR_givenS |
data frame. Contributions of spatial information to plot scores. |
lQ_givenT |
data frame. Contributions of trait information to species scores. |
lQ_givenP |
data frame. Contributions of phylogenetic information to species scores. |
row.w |
a vector. Weights attributed to plots. |
col.w |
a vector. Weights attributed to species. |
dudiL |
object of class |
dudiR |
object of class |
dudiQ |
object of class |
Author(s)
Sandrine Pavoine sandrine.pavoine@mnhn.fr
References
Pavoine, S., Vela, E., Gachet, S., de Belair, G., Bonsall, M.B. (2011) Linking patterns in phylogeny, traits, abiotic variables and space: a novel approach to linking environmental filtering and plant community assembly. Journal of Ecology, 99, 165–175.
Examples
## Not run:
if(require(ade4) && require(adegraphics) && require(ape)){
O <- adegpar()$plabels$optim
adegpar("plabels.optim" = TRUE)
data(mafragh, package="ade4")
xy <- mafragh$xy
#The object that defines the neighbourhood between plots is in
mneig <- mafragh$neig
#mneig is an object of class neig
s.label(mafragh$xy, nb = mafragh$nb, paxes.draw = FALSE)
#The environmental variables are in
env <- mafragh$env
names(env)
#The abundance data are in
flo <- mafragh$flo
# Adjustement of the writing of species names
names <- gsub(" ", "_", mafragh$spenames[colnames(flo), 1])
for(i in 1:26){
names <- gsub(LETTERS[i], letters[i], names)
}
names <- gsub("alisma_plantago", "alisma_plantago_aquatica", names)
colnames(flo) <- names
#The data on traits are in
traits <- lapply(mafragh$traits, function(x) x[colnames(flo), , drop=FALSE])
#The phylogenetic tree is in
phy <- read.tree(text=mafragh$tre)
plot(phy)
#Traits are separated by statistical type. The object traits is a list of data frames.
tabBinary <- prep.binary(traits$tabBinary, c(3, 4))
tabQuantitative <- traits$tabQuantitative
tabCircular <- prep.circular(traits$tabCircular, 1, 12)
tabOrdinal <- traits$tabOrdinal
#Analyses:
coaflo <- dudi.coa(flo, scan = FALSE, nf = 55)
vecspa <- scores.neig(mneig)
pcaspa <- dudi.pca(vecspa, coaflo$lw, scan = FALSE, nf = 96)
#We first removed environmental variables
env <- env[-(8:10)]
env[4:8] <- log(env[4:8])
pcaenv <- dudi.pca(env, coaflo$lw, scale = FALSE, scan = FALSE, nf = 8)
disT <- dist.ktab(ktab.list.df(list(tabBinary,
tabOrdinal[c("Spikiness", "Hairy leaves")])), c("B", "O"))
# The definition of the functional distances between species
# were slightly different in Pavoine et al. (2011).
pcotraits <- dudi.pco(disT, coaflo$cw, full = TRUE)
pcophy <- dudi.pco(sqrt(as.dist(cophenetic(phy)[names(flo), names(flo)])/2), coaflo$cw, full = TRUE)
rlqmix <- rlqESLTP(pcaenv, pcaspa, coaflo, pcotraits, pcophy, scan = FALSE, nf = 2)
barplot(rlqmix$eig)
rlqmix$eig[1]/sum(rlqmix$eig)
plot(rlqmix, xy=xy, ax=1, wh="S")
plot(rlqmix, phy=phy, ax=1, wh="P")
plot(rlqmix, traits=tabBinary, ax=1, type="B", wh="T")
plot(rlqmix, traits=tabOrdinal[2:3], ax=1, type="O", wh="T")
plot(rlqmix, env=env, ax=1, type="Q", wh="E")
adegpar("plabels.optim" = O)
}
## End(Not run)