distrib_data {nodiv} | R Documentation |
Data objects for node-based analysis
Description
Functions to collect and display data with matching species distributions and phylogenies
Usage
distrib_data(commatrix, coords = NULL, proj4string_in = CRS(as.character(NA)),
type = c("auto", "grid", "points"), shape = NULL)
nodiv_data(phylo, commatrix, coords, proj4string_in = CRS(as.character(NA)),
type = c("auto", "grid", "points"), shape = NULL)
## S3 method for class 'distrib_data'
summary(object, ...)
## S3 method for class 'nodiv_data'
summary(object, ...)
## S3 method for class 'distrib_data'
plot(x, ...)
## S3 method for class 'nodiv_data'
plot(x, ...)
## S3 method for class 'distrib_data'
identify(x, ...)
Arguments
phylo |
A phylogeny in ape's phylo format, with tip.labels that correspond to the species names in commatrix |
commatrix |
A community matrix or data.frame of species distributions, with species as columns, sites as rows, and 0/1 denoting the absence or presence of a species in a given site. Alternatively, the functions accept a |
coords |
The coordinates of all sites in the data. The input can be of a variety of different formats. Can be a |
proj4string_in |
Projection string as defined in package |
type |
A descriptor of whether the sites are point (community) sites, or the centres of regular grid cells. If omitted or set to |
shape |
An optional shapefile to overlay plots upon. |
object |
An object of type distrib_data or nodiv_data |
x |
An object of type distrib_data or nodiv_data |
... |
Further arguments to be passed to the plotting function |
Details
When making an object of type 'grid', the coordinates will be stored as SpatialPixels
from package sp
. This may result in a warning if there are rows or columns in the grid without data. The function removes these. This may affect plotting, but can otherwise be ignored.
Value
The distrib_data
function produces an object of type distrib_data
, which has the following components:
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 |
The nodiv_data
function produces an object of type nodiv_data
, which contains the additional component:
phylo |
A phylogeny of type |
Author(s)
Michael Krabbe Borregaard