CpB_RW {treesliceR}R Documentation

Calculates the range weighted rate of accumulation of phylogenetic B-diversity (CpB_RW) over time slices

Description

This function estimates the range-weighted rates of accumulation of phylogenetic B-diversity (CpB_RW) over time for inputted assemblages.

Usage

CpB_RW(tree, n, mat, adj, method = "multisite", criterion = "my", pBO = 5, ncor = 0)

Arguments

tree

phylo. An ultrametric phylogenetic tree in the "phylo" format.

n

numeric. A numeric value indicating the number of temporal slices (method = 1) or the time interval in million years (or phylogenetic diversity) among the tree slices (method = 2). Default is 1.

mat

matrix. A presence/absence matrix containing all studied species and sites.

adj

matrix. A square adjacency matrix containing the presence/absence information of all sites and their spatially adjacent ones.

method

character string. The method for calculating the phylogenetic beta-diversity. It can be either obtained through a "pairwise" or "multisite" approach. Default is "multisite".

criterion

character string. The method for cutting the tree. It can be either "my" (million years) or "PD" (accumulated phylogenetic diversity). Default is "my".

pBO

numeric. A value indicating the numeric proportion to define the temporal origin at which the range-weighted phylogenetic B-diversity (PB_RW) started to accumulate in a given assemblage. Default is 5%.

ncor

numeric. A value indicating the number of cores the user wants to parallelize. Default is 0.

Details

Parallelization

Users are advised to check the number of available cores within their machines before running parallel programming.

Value

The function returns a data frame containing the assemblages' rates of cumulative range-weighted phylogenetic B-diversity (CpB_RW), their total range-weighted phylogenetic B-diversity (PB_RW), and their origin (pBO).

Author(s)

Matheus Lima de Araujo matheusaraujolima@live.com

References

Laffan, S. W., Rosauer, D. F., Di Virgilio, G., Miller, J. T., González-Orozco, C. E., Knerr, N., Thornhill, A. H., & Mishler, B. D. (2016). Range-weighted metrics of species and phylogenetic turnover can better resolve biogeographic transition zones. Methods in Ecology and Evolution, 7(5), 580–588. https://doi.org/10.1111/2041-210x.12513

See Also

Other cumulative phylogenetic index analysis: CpD(), CpE(), CpB()

Examples

# Generate a random tree
tree <- ape::rcoal(20)

# Create a presence-absence matrix
mat <- matrix(sample(c(1,0), 20*10, replace = TRUE), ncol = 20, nrow = 10)
colnames(mat) <- tree$tip.label

# Create a random adjacency matrix
adj <- matrix(sample(c(1,0), 10*10, replace = TRUE), ncol = 10, nrow = 10)

# Fill the diagonals with 1
diag(adj) <- 1

# Calculate their CpB range weighted for 100 tree slices
CpB_RW(tree, n = 100, mat = mat, adj = adj, method = "multisite")


[Package treesliceR version 1.0.1 Index]