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 = FALSE, dist = NULL, prob = 0.05, beta = 1, cost_conv = FALSE, return_val = TRUE, proj_path = 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 {e}^{α d_{ij}} for patches i and j. To use patch capacity values different from the patch area, please use directly Graphab software. 
multihab 
A logical (default = FALSE) indicating whether the
'multihabitat' mode is used when computing the metric. It only applies to
the following metrics: 'EC', 'F', 'IF' and 'BC'. If TRUE, then the project
must have been created with the option 
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 layer (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 
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 2.8 manual:
https://sourcesup.renater.fr/www/graphab/download/manual2.8en.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.
P. Savary
## Not run: graphab_metric(proj_name = "grphb_ex", graph = "graph", metric = "PC", dist = 1000, prob = 0.05, beta = 1) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.