graphab_interpol: Creates a raster with interpolated connectivity metric values...

View source: R/graphab_interpol.R

graphab_interpolR Documentation

Creates a raster with interpolated connectivity metric values from metrics already computed in the Graphab project

Description

The function creates a raster with interpolated connectivity metric values from a metric already computed in the Graphab project.

Usage

graphab_interpol(
  proj_name,
  name,
  reso,
  linkset,
  graph,
  var,
  dist,
  prob = 0.05,
  thr = NULL,
  summed = FALSE,
  proj_path = NULL,
  alloc_ram = NULL
)

Arguments

proj_name

A character string indicating the Graphab project name. The project name is also the name of the project directory in which the file proj_name.xml is. It can be created with graphab_project

name

A character string indicating the name of the raster to be created after the interpolation.

reso

An integer indicating the spatial resolution in meters of the raster resulting from the metric interpolation.

linkset

A character string indicating the name of the link set used for the interpolation. It should be the one used to create the used graph and the metric.

graph

A character string indicating the name of the graph from which the metric was computed and whose links are considered for a potential multi-linkage with patches. This graph has been created with Graphab or using graphab_graph function and is associated with a link set.

var

A character string indicating the name of the already computed metric to be interpolated.

dist

A numeric or integer value specifying the distance at which we assume a probability equal to prob during the interpolation. It is used to set α for computing probabilities associated with distances between each pixel and the neighboring patch(es) such that probability between patch i and pixel j is p_{ij}= e^{-α d_{ij}}.

prob

A numeric or integer value specifying the probability at distance dist. By default, code=0.05. It is used to set α (see param dist above).

thr

(default NULL) If NULL, the value of each pixel is computed from the value of the metric at the nearest habitat patch, weighted by a probability depending on distance. If an integer, the value of each pixel depends on the values of the metric taken at several of the nearest habitat patches, up to a distance (cost or Euclidean distance, depending on the type of linkset) equal to thr.

summed

Logical (default = FALSE) only used if thr is not NULL, and specifying whether multiple values are summed up (TRUE) or averaged after being weighted by probabilities.

proj_path

(optional) A character string indicating the path to the directory that contains the project directory. It should be used when the project directory is not in the current working directory. Default is NULL. When 'proj_path = NULL', the project directory is equal to getwd().

alloc_ram

(optional, default = NULL) Integer or numeric value indicating RAM gigabytes allocated to the java process. Increasing this value can speed up the computations. Too large values may not be compatible with your machine settings.

Details

See more information in Graphab 2.8 manual: https://sourcesup.renater.fr/www/graphab/download/manual-2.8-en.pdf Be careful, when capacity has been changed. The last changes are taken into account for subsequent calculations in a project.

Author(s)

P. Savary

Examples

## Not run: 
graphab_interpol(proj_name = "grphb_ex",
                 name = "F_interp",
                 reso = 20,
                 linkset = "lcp",
                 graph = "graph",
                 var = "F_d600_p0.5_beta1_graph",
                 dist = 600,
                 prob = 0.5)

## End(Not run)

graph4lg documentation built on Feb. 16, 2023, 5:43 p.m.