nodesfile: Creation of nodefile attribute.

View source: R/nodesfile.R

nodesfileR Documentation

Creation of nodefile attribute.

Description

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

Usage

nodesfile(
  nodes,
  id = NULL,
  attribute = NULL,
  area_unit = "m2",
  restoration = NULL,
  weighted = FALSE,
  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 shapefile 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).

weighted

logical. If the nodes are of raster type, you can weight the estimated area of each node by the attribute. When using this parameter the attribute, which must be a vector of length equal to the number of nodes, usually has values between 0 and 1.

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


OscarGOGO/Makurhini documentation built on Jan. 9, 2025, 1:20 p.m.