Generates a table with the Core ID and the their attribute value (e.g. area in km²), using a shapefile with these values.

nodesfile(
  nodes,
  id,
  attribute = NULL,
  area_unit = "m2",
  restoration = NULL,
  write = NULL
)

Arguments

nodes

sp, sf object, RasterLaryer or SpatRaster (terra package). It must be in a projected coordinate system.

id

character. If nodes is a shappefile then you must specify the column name with the node ID in the shapefile data table. If nodes is a raster layer then raster values (Integer) will be taken as "id".

attribute

character or vector. If nodes is a shappefile then you must specify the column name with the attribute in the data table 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.

area_unit

character. If attribute is NULL you can set an area unit, ?unit_covert compatible unit ("m2", "Dam2, "km2", "ha", "inch2", "foot2", "yard2", "mile2"). Default equal to "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).

write

character. Output folder path if you use the name option, otherwise, place the output path, with the name and extension ".txt"

Value

nodo file in .txt format