View source: R/graphab_modul.R
graphab_modul | R Documentation |
The function creates modules from a graph by maximising modularity
graphab_modul( proj_name, graph, dist, prob = 0.05, beta = 1, nb = NULL, return = 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 modularity index is computed. This graph has been created with Graphab
or using |
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, |
nb |
(optional, default=NULL) An integer or numeric value indicating the number of modules to be created. By default, it is the number that maximises the modularity index. |
return |
Logical (default=TRUE) indicating whether results are returned to user. |
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. |
This function maximises a modularity index by searching for the node partition involves a large number of links within modules and a small number of inter-module links. Each link is given a weight in the computation, such as the weight w_{ij} of the link between patches i and j is:
w_{ij} = (a_{i} a_{j})^β e^{-α d_{ij}}
. This function does not allow users to convert automatically Euclidean distances into cost-distances. See more information in Graphab 2.8 manual: https://sourcesup.renater.fr/www/graphab/download/manual-2.8-en.pdf
If return=TRUE
, the function returns a message indicating
whether the partition has been done. New options are being developed.
P. Savary
## Not run: graphab_modul(proj_name = "grphb_ex", graph = "graph", 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.