Use this function to calculate the PC and IIC indexes under one or several distance thresholds.

MK_dPCIIC(
  nodes,
  attribute = NULL,
  area_unit = "m2",
  restoration = NULL,
  distance = list(type = "centroid", resistance = NULL),
  metric = c("IIC", "PC"),
  probability = NULL,
  distance_thresholds = NULL,
  overall = FALSE,
  onlyoverall = FALSE,
  LA = NULL,
  rasterparallel = NULL,
  write = NULL,
  intern = TRUE
)

Arguments

nodes

Nodes, patches, fragments, etc. Object of class sf, SpatialPolygonsDataFrame, raster or data frame. If spatial layer, then it must be in a projected coordinate system. If nodes is a raster layer then raster values (Integer) will be taken as "id". If nodes is a data frame, then it must have at least two columns, first column with nodes "id" and second with the attribute. If you use the restoration argument, then you must have a dataframe with three columns where the third column is equal the restoration values

attribute

character or vector. If nodes is a shappefile then you must specify the column name with the attribute selected for the nodes. If nodes is a raster layer then it must be a numeric vector with the node's attribute. The length of the vector must be equal to the number of nodes. The numeric vector is multiplied by the area of each node to obtain a weighted habitat index. If NULL the node area will be used as a node attribute, the unit area can be selected using the "area_unit" argument. If nodes is a data frame then it must have two columns where second column is the attribute.

area_unit

character. If attribute is NULL you can set an area unit (e.g., "km2", "cm2", "ha"; see Makurhini::unit_convert). Default equal to hectares "m2".

restoration

character or vector. If nodes is a shappefile then you must specify the name of the column with restoration value. If nodes is a raster layer then must be a numeric vector with restoration values to each node in the raster. Binary values (0,1), where 1 = existing nodes in the landscape, and 0 = a new node to add to the initial landscape (restored). If nodes is a data frame then it must have three columns where third column has restoration values.

distance

list or distance matrix. If it is a list, then it must be a set of distance parameters. For example: type, resistance,or keep. For "type" choose one of the distances: "centroid" (faster), "edge", "least-cost" or "commute-time". If the type is equal to "least-cost" or "commute-time", then you have to use the "resistance" argument. To see more arguments see the ?distancefile. If it is a distance matrix, then the number of columns and rows must be equal the number of nodes and "id".

metric

character. Choose a connectivity metric: "IIC" considering topological distances or "PC" considering maximum product probabilities.

probability

numeric. Connection probability to the selected distance threshold, e.g., 0.5 that is 50 percentage of probability connection. Use in case of selecting the "PC" metric. If probability = NULL, then it will be the inverse of the mean dispersal distance for the species (1/α; Hanski and Ovaskainen 2000).

distance_thresholds

numeric. Distance or distances thresholds to establish connections (meters). For example, one distance: distance_threshold = 30000; two or more specific distances: distance_thresholds = c(30000, 50000); sequence distances: distance_thresholds = seq(10000,100000, 10000). If NULL then the mean distance between nodes will be estimated and used.

overall

logical. If TRUE, then the EC index will be added to the result which is transformed into a list. Default equal to FALSE

onlyoverall

logical. If TRUE, then only overall metrics will be calculated.

LA

numeric. Maximum landscape attribute (attribute unit, if attribute is NULL then unit is equal to m2).

rasterparallel

numeric. Specify the number of cores to use for parallel processing, default = NULL. If nodes is "raster" then you can use this argument to assign the metrics values to the nodes raster. It is useful when raster resolution is less than 100 m2.

write

character. Write output shapefile and overall table (if TRUE overall argument). It is necessary to specify the "Folder direction" + "Initial prefix", for example, "C:/ejemplo".

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.

Note

Sometimes the advance process does not reach 100 percent when operations are carried out very quickly.

References

Saura, S. & Torné, J. 2012. Conefor 2.6 user manual (May 2012). Universidad Politécnica de Madrid. Available at www.conefor.org.
Pascual-Hortal, L. & Saura, S. 2006. Comparison and development of new graph-based landscape connectivity indices: towards the priorization of habitat patches and corridors for conservation. Landscape Ecology 21 (7): 959-967.
Saura, S. & Pascual-Hortal, L. 2007. A new habitat availability index to integrate connectivity in landscape conservation planning: comparison with existing indices and application to a case study. Landscape and Urban Planning 83 (2-3): 91-103. Hanski, I. and Ovaskainen, O. 2000. The metapopulation capacity of a fragmented landscape. Nature 404: 755–758.

Examples

if (FALSE) { library(Makurhini) data("vegetation_patches", package = "Makurhini") nrow(vegetation_patches) # Number of patches #Two distance threshold, IIC <- MK_dPCIIC(nodes = vegetation_patches, attribute = NULL, area_unit = "m2", distance = list(type = "centroid"), metric = "IIC", distance_thresholds = c(2000, 4000, 6000, 8000, 10000)) #1:10 km IIC plot(IIC$d2000["dIIC"], breaks = "jenks") plot(IIC$d2000["dIICflux"], breaks = "jenks") plot(IIC$d2000["dIICconnector"]) #Using raster data("raster_vegetation_patches", package = "Makurhini") PC <- MK_dPCIIC(nodes = raster_vegetation_patches, attribute = NULL, distance = list(type = "centroid"), metric = "PC", probability = 0.5, overall = TRUE, distance_thresholds = 40000) # 40 km PC }