rescale.min.dist: Rescaling of data based on the minimum distance between sites

View source: R/zetadiv.R

rescale.min.distR Documentation

Rescaling of data based on the minimum distance between sites

Description

Combines sites based on the minimum distance between them.

Usage

rescale.min.dist(
  xy,
  data.spec,
  data.env = NULL,
  m,
  distance.type = "Euclidean",
  dist.custom = NULL,
  method = "mean",
  shuffle = FALSE
)

Arguments

xy

Site-by-coordinate data frame, with sites as rows and coordinates as columns.

data.spec

Site-by-species presence-absence data frame, with sites as rows and species as columns.

data.env

Site-by-variable data frame, with sites as rows and environmental variables as columns.

m

Mapping grain (the number of sites combined to generate data at a coarser grain). The m closest sites are grouped together.

distance.type

Method to compute distance. Default is "Euclidean", for Euclidean distance. The other options are (i) "ortho" for orthodromic distance, if xy correspond to longitudes and latitudes (orthodromic distance is computed using the geodist function from package geodist); and (ii) "custom", in which case the user must provide a distance matrix for dist.custom.

dist.custom

Distance matrix provided by the user when distance.type = "custom".

method

Name of a function (as a string) indicating how to combine the coordinates and the environmental variables. It can be a basic R-function such as "mean" or "max", but also a custom function.

shuffle

Boolean value (TRUE or FALSE) indicating if the order of the sites must be randomised, which can have an impact on the outputs if some distances are equal.

Details

The nearest neighbouring sites (plots, quadrates, or areas of varying shapes) are grouped as spatial clusters of 2, 3, 4, etc. sites, based on the minimum distance between them. Since the procedure is based on the relative distance between sites, the site order can have an impact on the output. This function is suitable for both regularly and irregularly spaced sites, contiguous or non contiguous. For regularly spaced sites, the use of rescale.regular is recommended.

Value

rescale.min.dist returns a data frame with the rescaled data.

References

Hui C. & McGeoch M.A. (2014). Zeta diversity as a concept and metric that unifies incidence-based biodiversity patterns. The American Naturalist, 184, 684-694.

Scheiner S.M., Chiarucci A., Fox G.A., Helmus M.R., McGlinn D.J. & Willig M.R. (2011). The underpinnings of the relationship of species richness with space and time. Ecological Monographs, 81, 195-213.

See Also

Zeta.decline.mc, Zeta.order.mc, Zeta.decline.ex, Zeta.order.ex,

Zeta.scale.min.dist, Zeta.scale.regular, rescale.regular

Examples

utils::data(Marion.species)
xy.marion <- Marion.species[,1:2]
data.spec.marion <- Marion.species[,3:33]

data.rescale <- rescale.min.dist(xy.marion, data.spec.marion, m=2)


zetadiv documentation built on June 11, 2022, 1:12 a.m.