pcps.curve: Curve of phylogenetic signal at metacommunity level

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/pcps.curve.R

Description

The function estimate the phylogenetic signal at metacommunity level and draws a representation curve.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
pcpc.curve.calc(values, vectors, mt)

pcps.curve(comm, phylodist, trait, method = "bray", squareroot = TRUE,
  ranks = TRUE, null.model.ts = FALSE, null.model.bm = FALSE, tree,
  runs = 99, progressbar = FALSE, parallel = NULL, newClusters = TRUE,
  CL = NULL)

## S3 method for class 'pcpscurve'
plot(x, draw.model = c("none", "ts", "bm"), type = "b",
  probs = c(0.025, 0.975), col = "black", model.col = "black", ...)

## S3 method for class 'pcpscurve'
print(x, ...)

## S3 method for class 'pcpscurve'
summary(object, probs = c(0.025, 0.975), ...)

Arguments

values

The eigenvalues, relative eigenvalues and cumulative relative eigenvalues returned by pcps.

vectors

The principal coordinates of phylogenetic structure returned by pcps.

mt

Matrix containing trait average at community level for one trait.

comm

Community data, with species as columns and sampling units as rows. This matrix can contain either presence/absence or abundance data.

phylodist

Matrix containing phylogenetic distances between species.

trait

Matrix data of species described by traits, with traits as columns and species as rows.

method

Dissimilarity index, as accepted by vegdist (Default dist = "bray").

squareroot

Logical argument (TRUE or FALSE) to specify if use square root of dissimilarity index (Default squareroot = TRUE).

ranks

Logical argument (TRUE or FALSE) to specify if ordinal variables are convert to ranks (Default ranks = TRUE).

null.model.ts

Logical argument (TRUE or FALSE) to specify if use null model that shuffles terminal tips across the phylogenetic tree to generate null curves. See details (Default null.model.ts = FALSE).

null.model.bm

Logical argument (TRUE or FALSE) to specify if use null model that simulate trait evolving under Brownian motion to generate null curves. See details (Default null.model.bm = FALSE).

tree

Phylogenetic tree, as phylo object.

runs

Number of randomizations.

progressbar

Logical argument (TRUE or FALSE) to specify if display a progress bar on the R console (Default progressbar = FALSE).

parallel

Number of parallel processes. Tip: use detectCores() (Default parallel = NULL).

newClusters

Logical argument (TRUE or FALSE) to specify if make new parallel processes or use predefined socket cluster. Only if parallel is different of NULL (Default newClusters = TRUE).

CL

A predefined socket cluster done with parallel package.

x

An object of class pcpscurve.

draw.model

Type of null model to draw; none (none), taxa shuffle (ts), browian motion model (bm).

type

Type of the plot to be drawn (Default type = "b").

probs

Numeric vector of probabilities used by quantile. (Default probs = c(0.025, 0.975)).

col

Plot color.

model.col

Color of lines of null models.

...

Further graphical parameters for points.

object

An object of class pcpscurve.

Details

The PCPS are used, in a sequential manner, as predictors in a linear regression to model the trait averages across the metacommunity. The curve is drawn as the percentage of cumulative eigenvalues in the abscissa and as the determination coefficient of regressions in the ordinate.

Two null models are available. The first one (ts), the null curves are generated shuffling terminal tips across the phylogenetic tree, generates a set of random PCPS and recalculates the curves. The second (bm), the null curves are generated with simulate traits evolving under Brownian motion model.

Value

curve.obs

The cumulative PCPS eigenvalues and the coefficient of determination.

curve.null.ts

The cumulative PCPS eigenvalues and the coefficient of determination for each randomization using the taxa shuffle null model.

curve.null.bm

The cumulative PCPS eigenvalues and the coefficient of determination for each randomization using the Brownian motion null model.

Author(s)

Vanderlei Julio Debastiani <[email protected]>

References

Duarte, L.S. (2011). Phylogenetic habitat filtering influences forest nucleation in grasslands. Oikos, 120, 208:215.

See Also

matrix.p, pcps

Examples

1
2
3
4
5
6
data(flona)
res<-pcps.curve(flona$community, flona$phylo, flona$trait[,1,drop = FALSE], 
       null.model.ts = TRUE, runs = 9)
res
summary(res)
plot(res, draw.model = "ts", type = "b", col = "red")

PCPS documentation built on May 24, 2018, 5:04 p.m.

Related to pcps.curve in PCPS...