Function to generate Principal Coordinates of Phylogenetic Structure (PCPS).
pcps(
comm,
phylodist,
checkdata = TRUE,
method = "bray",
squareroot = TRUE,
correlations = TRUE
)# S3 method for pcps
plot(
x,
groups = NULL,
choices = c(1, 2),
display = "text",
showlabel = TRUE,
...
)
# S3 method for pcps
print(x, ...)
# S3 method for summarypcps
print(x, ...)
scores.pcps(x, choices = c(1, 2), ...)
# S3 method for pcps
summary(object, choices = c(1, 2), ...)
Community data, with species as columns and sampling units as rows. This matrix can contain either presence/absence or abundance data. Alternatively comm can be an object of class metacommunity.data, an alternative way to set all data.frames/matrices. When you use the class metacommunity.data the argument phylodist must not be specified. See details.
Matrix containing phylogenetic distances between species.
Logical argument (TRUE or FALSE) to check if species sequence in the community data follows the same order as the one in the phylodist matrix (Default checkdata = TRUE).
Dissimilarity index, as accepted by vegdist
(Default dist="bray").
Logical argument (TRUE or FALSE) to specify if use square root of dissimilarity index (Default squareroot = TRUE).
Logical argument (TRUE or FALSE) to specify if are calculed the correlations between each PCPS and each species in matrix P (Default correlations = TRUE).
An object of class pcps.
Factor giving the groups (Clades) for each species (Default groups = NULL).
Axes for re-scaling. Choices must have length equal to two (Default choices = c(1, 2)).
Display text or points for the sampling units, partial match to "text" or "points" (Default display = "text").
Label the groups by their names in the centroid of the object.
Other parameters for the respective functions.
An object of class pcps.
Phylogeny-weighted species composition matrix.
The eigenvalues, relative eigenvalues and cumulative relative eigenvalues.
The principal coordinates of phylogenetic structure (PCPS).
Correlations between a PCPS axis and phylogenetically weighted species abundances or frequencies.
Scores for biplot graphics.
The function obtains a matrix containing phylogeny-weighted species composition
(matrix.p
) and is submitted to principal coordinates analysis (PCoA).
This method generates the principal coordinates of phylogenetic structure
(PCPS) (Duarte, 2011).
The sequence species show up in the community data matrix must be the
same as they show up in the phylogenetic distance matrix. The
function organize.pcps
organizes the data, placing the matrices of
community and phylogenetic distance in the same order. The use of
organize.pcps is not requered for run this function, but is recommended. In this way
the arguments comm and phylodist can be specified them as normal arguments or by passing
them with the object returned by the function organize.pcps
using, in this
case only the argument comm. Using the object returned by organize.pcps, the comm argument
is used as an alternative way of entering to set all data.frames/matrices, and therefore
the phylodist argument must not be specified.
The function summary or the function scores.pcps re-scales the correlation values
for obtain the scores for biplot
graphics. The function plot draws a
simple biplot and represent clades as "spider" graphs (see ordispider
).
Duarte, L.S. (2011). Phylogenetic habitat filtering influences forest nucleation in grasslands. Oikos, 120, 208:215.
# NOT RUN {
data(ADRS)
res<-pcps(ADRS$community, ADRS$phylo)
res
summary(res)
summary(res, choices = c(1, 2))$scores
plot(res, display = "text", groups = c(rep("Clade-A", 2), rep("Clade-B", 4)))
# }
Run the code above in your browser using DataLab