Learn R Programming

The nodiv R package

nodiv - Node-based analysis of species distributions

The package implements Borregaard et al. (2014) method for identifying nodes in a phylogeny associated with divergent distributions. The main algorithm goes through each node in the phylogeny and relates node overlap to a null model. The package also provides functions for preparing the data sets, for exploratory plots and further analysis.

The workflow starts by creating nodiv_data data object, which makes sure that the phylogeny, the species distributions and the spatial coordinates of sites are matched correctly. The function takes a number of data types. There are several functions for exploratory data analysis, including plot, summary, richness, Node_occupancy, Node_size etc. The core of the package are the functions Nodesig, which compares the distributions of the two clades descending from a node, and Node_analysis, which applies this function to all nodes in the phylogeny and summarizes the results as a nodiv_result object. There is a set of functions for interpretation of the results, including plot, plotSOS, and summary. The package also provides basic functions for plotting and manipulating data sets that combine spatial distributions with phylogenies, e.g. subsample, plot_grid and plot_points.

Copy Link

Version

Install

install.packages('nodiv')

Monthly Downloads

333

Version

1.4.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Michael Borregaard

Last Published

August 21st, 2023

Functions in nodiv (1.4.2)

add_shape

Add a shapefile to a nodiv data object
sitestat

Site statistics of nodiv data objects
Nodesig

Compare the distributions of a pair of sister clades
coquettes

Distribution of coquette hummingbirds in Northern South America
subsample

Subsampling data objects to certain species or sites
distrib_data

Data objects for node-based analysis
Nspecies

Basic attributes of distrib_data objects
species_stat

Species statistics of nodiv data objects
two_color_map

Plot the relative amounts of two variables using a purple-green color scheme
SOS

Gives the SOS values for a given node.
plot_nodes_phylo

Plot a phylogeny with colored node labels
basal_node

Identify nodes in a phylogeny
Node_analysis

Calculate GND and SOS scores for a phylogeny and community data set
plot_points

Plot a variable on spatial points or a spatial grid using a color scale.
plot_richness

Plot a richness map for an object of type distrib_data, nodiv_data or nodiv_result
gridData

Apply a grid (2D bins) to nodiv objects of type 'points'
nodiv-package

nodiv - Node-based analysis of species distributions
occurrences

Access functions to the community matrix of distrib_data objects
phyplot

Plot Phylogenies
Node_size

Attributes of individual clades
update_object

Update distrib_data objects to the nodiv version >= 1.1 format