Node_analysis {nodiv} | R Documentation |
Calculate GND and SOS scores for a phylogeny and community data set
Description
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.
Usage
Node_analysis(nodiv_data, repeats = 100, method = c("rdtable", "quasiswap"),
cores = 1, log_parallel_progress = FALSE)
## S3 method for class 'nodiv_result'
summary(object, ...)
## S3 method for class 'nodiv_result'
print(x, printlen = 4, ...)
## S3 method for class 'nodiv_result'
plot(x, label = nodenumbers(x), zlim = 0:1, ...)
Arguments
nodiv_data |
An object created by the |
repeats |
Number of null communities to create at each node |
method |
The null model algorithm used to simulate random communities |
cores |
The number of cores to use in the computation. Note that multi-core processing is yet unimplemented. |
log_parallel_progress |
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. |
object |
The |
x |
The |
printlen |
The number of species to print to screen |
label |
The text to use for labelling nodes in the plot |
zlim |
The values of GND to use for the extremes of the color scale on the plot |
... |
Further arguments to be passed to the function |
Details
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.
Value
The result is an object of type nodiv_result
, which has the following components:
GND |
A numeric vector between 0 and 1 describing the distributional divergence associated with a node |
SOS |
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:
coords |
A |
comm |
The community matrix |
type |
A character vector describing the type of data |
species |
A list of species names |
shape |
An optional slot detailing a shapefile object for plotting the data |
phylo |
A phylogeny of type |
Author(s)
Michael Krabbe Borregaard
References
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
See Also
Examples
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)