test_metric_distance: Test the ECA or ProtConn metrics using multiple dispersal...

View source: R/test_metric_distance.R

test_metric_distanceR Documentation

Test the ECA or ProtConn metrics using multiple dispersal distances

Description

Test the ECA or ProtConn metrics using multiple dispersal distances

Usage

test_metric_distance(
  nodes,
  attribute = NULL,
  distance1 = NULL,
  distance2 = NULL,
  distance3 = NULL,
  distance4 = NULL,
  metric = "IIC",
  probability = NULL,
  distance_thresholds,
  region = NULL,
  LA = NULL,
  transboundary = NULL,
  area_unit = "ha",
  groups = 3,
  write = NULL,
  intern = TRUE
)

Arguments

nodes

Object of class sf, sfc, sfg, SpatialPolygons.

attribute

character. Column name with the nodes attribute. If NULL, then the nodes area will be estimated and used as the attribute.

distance1

list. Distance parameters. For example: type, resistance,or keep. For "type" choose one of the distances: "centroid" (faster), "edge", "least-cost distance" or "commute distance". If the type is equal to "least-cost distance" or "commute distance", then you have to use the "resistance" argument. "keep" is a numeric value used for higher processing. To See more options consult the help function of distancefile().

distance2

list. see distance1 argument

distance3

list. see distance1 argument

distance4

list. see distance1 argument

metric

A character indicating the connectivity metric to use: "PC" (the default and recommended) to calculate the probability of connectivity index, and "IIC" to calculate the binary integral index of connectivity.

probability

A numeric value indicating the probability that corresponds to the distance specified in the distance_threshold. For example, if the distance_threshold is a median dispersal distance, use a probability of 0.5 (50%). If the distance_threshold is a maximum dispersal distance, set a probability of 0.05 (5%) or 0.01 (1%). Use in case of selecting the "PC" metric. If probability = NULL, then a probability of 0.5 will be used.

distance_thresholds

A numeric indicating the dispersal distance or distances (meters) of the considered species. If NULL then distance is estimated as the median dispersal distance between nodes. Alternatively, the dispersal_distance function can be used to estimate the dispersal distance using the species home range. Can be the same length as the distance_thresholds parameter.

region

object of class sf, sfc, sfg, SpatialPolygons. If metric is equal to "ProtConn" then you must provide a region polygon.

LA

numeric. (optional, default = NULL). The maximum landscape attribute, which is the attribute value that would correspond to a hypothetical habitat patch covering all the landscape with the best possible habitat, in which IIC and PC would be equal to 1. For example, if nodes attribute corresponds to the node area, then LA equals total landscape area. If nodes attribute correspond to a quality-weighted area and the quality factor ranges from 0 to 100, LA will be equal to 100 multiplied by total landscape area. The value of LA does not affect at all the importance of the nodes and is only used to calculate the overall landscape connectivity. If no LA value is entered (default) and overall = TRUE or onlyoverall = TRUE, the function will only calculate the numerator of the global connectivity indices and the equivalent connected ECA or EC index.

transboundary

numeric. Buffer to select polygons in a second round, their attribute value = 0, see Saura et al. 2017. You can set one transboundary value or one per each threshold distance.

area_unit

character. (optional, default = "m2")
. A character indicating the area units when attribute is NULL. Some options are "m2" (the default), "km2", "cm2", or "ha"; See unit_convert for details.

groups

numeric. Number of selected representative threshold distances (distance just before the biggest changes in connectivity metric)

write

character. Folder path and prefix, for example: "C:/Folder/test".

intern

logical. Show the progress of the process, default = TRUE. Sometimes the advance process does not reach 100 percent when operations are carried out very quickly.

References

Correa Ayram, C. A., Mendoza, M. E., Etter, A., & Pérez Salicrup, D. R. (2017). Anthropogenic impact on habitat connectivity: A multidimensional human footprint index evaluated in a highly biodiverse landscape of Mexico. Ecological Indicators, 72, 895–909. https://doi.org/10.1016/j.ecolind.2016.09.007

Examples

## Not run: 
library(Makurhini)
library(sf)

data("list_forest_patches", package = "Makurhini")
data("study_area", package = "Makurhini")

Max_attribute <- unit_convert(st_area(study_area), "m2", "ha")

test_metric_distance(nodes = list_forest_patches[[1]],
                     distance1 =list(type= "centroid"),
                     distance2 =list(type= "edge"),
                     attribute = NULL, area_unit = "ha",
                     LA = Max_attribute ,
                     distance_thresholds = seq(10000,100000, 10000),
                     groups = 0)


load(system.file("extdata", "Protected_areas.rda",
                package = "Makurhini", mustWork = TRUE))
data("Ecoregions", package = "Makurhini")
region <- Ecoregions[1,]

test_metric_distance(nodes = Protected_areas,
                     distance1 =list(type= "centroid"),
                     distance2 =list(type= "edge", keep = 0.05),
                     metric = "ProtConn", probability = 0.5,
                     area_unit = "ha",
                     region = region, transboundary = 50000,
                     distance_thresholds = seq(10000,100000, 10000))

## End(Not run)

connectscape/Makurhini documentation built on Jan. 12, 2025, 8:16 p.m.