graphab_metapatch: Create a new habitat type made of meta-patches based on...

View source: R/graphab_metapatch.R

graphab_metapatchR Documentation

Create a new habitat type made of meta-patches based on inter-patch distances in an existing graph

Description

The function creates a new habitat type made of meta-patches based on inter-patch distances in an existing pruned graph

Usage

graphab_metapatch(
  proj_name,
  graph,
  mincapa = NULL,
  proj_path = NULL,
  parallel.java = 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

graph

A character string indicating the name of the graph from which the meta-patches are created. This graph should have several components. Each of them includes one or several habitat patches and they will each correspond to a single habitat (meta-)patch in the new habitat type created by this function. The graph should have been created using the graphab_graph function and is associated with a link set. The latter should not be complete.

mincapa

An integer or numeric value indicating the minimum capacity of the meta-patch to conserve in the new habitat type. This capacity is computed as the sum of the capacities of all the patches included in a meta-patch.

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().

parallel.java

An integer indicating how many computer cores are used to run the .jar file. By default, parallel.java = NULL, and java sets it according to local settings.

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 3.0 manual: https://thema.umlp.fr/productions/software/graphab/download/manual-3.0-en.pdf Note that a name is automatically given to this new habitat type.

Author(s)

P. Savary

References

\insertRef

foltete2012softwaregraph4lg \insertReffoltete2021graphabgraph4lg \insertRefsavary2024multiplegraph4lg

Examples

## Not run: 
graphab_metapatch(proj_name = "graphab_example",
                 graph = "graph_forest_thr200")

## End(Not run)

graph4lg documentation built on Sept. 24, 2026, 5:12 p.m.