Learn R Programming

graph4lg (version 2.0.0)

get_graphab_metric: Get metrics computed at the patch/node level in the Graphab project

Description

The function gets the values of metrics computed at the patch/node level in the Graphab project.

Usage

get_graphab_metric(
  proj_name,
  habitat = NULL,
  graph = NULL,
  metric = NULL,
  proj_path = NULL
)

Value

A data.frame or list of data.frames with the values of metrics computed at the patch/node level for a given habitat type or a given graph. The data.frame indicate the type of habitat to which each node/patch corresponds, and the name of the metric includes that of the graph on which it was computed.

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.

habitat

(default=NULL) A character string indicating the name of the habitat type for which the metric values should be returned. If NULL, there is no selection on the habitat type.

graph

(default=NULL) A character string indicating the name of the graph for which the metric values should be returned. If NULL, there is no selection on the graph name.

metric

(default=NULL) A character string indicating the name of the metric for which the values should be returned. If NULL, there is no selection on the metric name.

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

Author

P. Savary

Details

Only local metrics computed for patches/nodes, for a given habitat type and from one or several graphs can be returned. Global metrics are not allowed. When the name of a metric is given, only the values of this metric are returned. At least one of the parameters habitat, habitat, or metric must not be NULL. See more information in Graphab 3.0 manual: https://thema.umlp.fr/productions/software/graphab/download/manual-3.0-en.pdf

Examples

Run this code
if (FALSE) {
get_graphab_metric(proj_name = "graphab_example",
                   habitat = "forest")
}

Run the code above in your browser using DataLab