Combines sites based on the minimum distance between them.
rescale.min.dist(
xy,
data.spec,
data.env = NULL,
m,
distance.type = "Euclidean",
dist.custom = NULL,
method = "mean",
shuffle = FALSE
)
Site-by-coordinate data frame, with sites as rows and coordinates as columns.
Site-by-species presence-absence data frame, with sites as rows and species as columns.
Site-by-variable data frame, with sites as rows and environmental variables as columns.
Mapping grain (the number of sites combined to generate data at a coarser grain). The m
closest sites are grouped together.
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
.
Distance matrix provided by the user when distance.type
= "custom"
.
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.
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.
rescale.min.dist
returns a data frame with the rescaled data.
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.
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.
Zeta.decline.mc
, Zeta.order.mc
, Zeta.decline.ex
, Zeta.order.ex
,
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab