View source: R/Node_analysis_function.R
Node_analysis | R Documentation |
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 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, ...)
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 |
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.
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 |
Michael Krabbe Borregaard
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.