View source: R/graphab_metric.R
| graphab_metric | R Documentation |
The function computes connectivity metrics on a graph from a link set in a Graphab project
graphab_metric(
proj_name,
graph,
metric,
multihab = NULL,
resfile = NULL,
dist = NULL,
prob = 0.05,
beta = 1,
cost_conv = FALSE,
return_val = TRUE,
proj_path = NULL,
parallel.java = NULL,
alloc_ram = NULL
)
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. |
graph |
A character string indicating the name of the graph on which
the metric is computed. This graph has been created with Graphab
or using |
metric |
A character string indicating the metric which will be computed on the graph. This metric can be:
For most metrics, the interaction probability is computed for each pair of
patches from the path that minimizes the distance d (or the cost) between
them. It then maximizes |
multihab |
(optional, default = NULL) A character string indicating whether the metric value should be decomposed across the different habitat types and their pairwise combinations. If ‘multihab=’all'', all the pairwise combinations are considered, including the within-habitat case. If ‘multihab=’inter'', only the inter-habitat types combinations are considered. Note that this argument is only required if the graph on which you compute the metrics is based on several habitat types. |
resfile |
(optional, default = NULL) A character string giving the name of the text file storing the results of the computation. Must be of the form 'file.txt'. |
dist |
A numeric or integer value specifying the distance at which
dispersal probability is equal to |
prob |
A numeric or integer value specifying the dispersal probability
at distance |
beta |
A numeric or integer value between 0 and 1 specifying the
exponent associated with patch areas in the computation of metrics
weighted by patch area. By default, |
cost_conv |
FALSE (default) or TRUE. Logical indicating whether numeric
|
return_val |
Logical (default = TRUE) indicating whether metric values are returned in R (TRUE) or only stored in the patch attribute layers (FALSE) |
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 |
parallel.java |
An integer indicating how many computer cores are used
to run the .jar file. By default, |
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. |
The metrics are described in Graphab 3.0 manual:
https://thema.umlp.fr/productions/software/graphab/download/manual-3.0-en.pdf
Graphab software makes possible the computation of other metrics.
Be careful, when the same metric is computed several times, the option
return=TRUE is not returning the right columns. In these cases,
use get_graphab_metric.
If return_val=TRUE, the function returns a data.frame
with the computed metric values and the corresponding patch ID when the
metric is local or delta metric, or the numeric value of the global metric.
If the metric is computed on a graph whose nodes belong to different habitat
categories, the returned table includes several habitat categories.
P. Savary
foltete2012softwaregraph4lg \insertReffoltete2021graphabgraph4lg \insertRefsavary2024multiplegraph4lg
## Not run:
graphab_metric(proj_name = "graphab_example",
graph = "graph_forest",
metric = "F",
multihab = "all",
dist = 1000,
prob = 0.05,
beta = 1,
cost_conv = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.