Goes through each node in the phylogeny, and compares the distribution overlap of sister clades to that expected from a null mode that considers node size, species richness and range size.
Node_analysis(nodiv_data, repeats = 100, method = c("rdtable", "quasiswap"),
cores = 1, log_parallel_progress = FALSE)
# S3 method for nodiv_result
summary(object, ...)
# S3 method for nodiv_result
print(x, printlen = 4, ...)
# S3 method for nodiv_result
plot(x, label = nodenumbers(x), zlim = 0:1, ...)
The result is an object of type nodiv_result
, which has the following components:
A numeric vector between 0 and 1 describing the distributional divergence associated with a node
A numeric matrix given the SOS of values, which expresses the difference between empirical and expected species richness of each clade at each site
It also includes all the elements of the nodiv_data
object:
A SpatialPointsDataFrame
or SpatialPixelsDataFrame
(from sp
) with spatial coordinates, and one column named sites
containing the site names
The community matrix
A character vector describing the type of data
A list of species names
An optional slot detailing a shapefile object for plotting the data
A phylogeny of type phylo
from package ape
An object created by the nodiv_data
function
Number of null communities to create at each node
The null model algorithm used to simulate random communities
The number of cores to use in the computation. Note that multi-core processing is yet unimplemented.
If this is TRUE, the results from each node will be saved as an '.rda' file in the working directory. Useful for large parallel computations.
The nodiv_result
object
The nodiv_result
object
The number of species to print to screen
The text to use for labelling nodes in the plot
The values of GND to use for the extremes of the color scale on the plot
Further arguments to be passed to the function
Michael Krabbe Borregaard
The "rdtable" algorithm is efficient, but may underestimate the deviation between nodes. It should primarily be used for exploratory data analysis. Note that the more robust "quasiswap" algorithm may take days to run on larger data sets.
The plot
function for nodiv_result
plots the phylogenetic tree with colored symbols at the nodes. The color and size the nodes are proportional with the GND value of the node.
Borregaard, M.K., Rahbek, C., Fjeldsaa, J., Parra, J.L., Whittaker, R.J. & Graham, C.H. 2014. Node-based analysis of species distributions. Methods in Ecology and Evolution 5(11): 1225-1235. DOI: 10.1111/2041-210X.12283
plotSOS
data(coquettes)
res <- Node_analysis(coquettes, 50, "rdtable")
opar <- par(mfrow = c(1,2))
plot(res)
plotSOS(res, 28, shapefill = terrain.colors(64))
summary(res)
par(opar)
Run the code above in your browser using DataLab