nn_sum {geohabnet} | R Documentation |
Calculation on network metrics a.k.a centralities.
Description
These are functions under the igraph
package adapted to calculate habitat connectivity.
In the context of habitat connectivity, the functions can be interpreted as follows:
-
nn_sum()
: Calculates the sum of nearest neighborsigraph::knn()
. -
node_strength()
: Calculates the sum of edge weights of adjacent nodesigraph::strength()
. -
betweenness()
: Calculates the node betweenness based on the number of shortest paths. Because theigraph::betweenness()
function in interprets link weights as distances to calculate the shortest paths, thebetweeness()
function in geohabnet transforms the link weights (or the relative likelihood of pathogen or pest movement) in the adjacency matrix so that higher link weight values will be the shortest (or more likely) paths for pathogen or pest movement. -
ev()
: Calculates the eigenvector centrality of positions within the networkigraph::eigen_centrality()
. -
closeness()
: measures how many steps is required to access every other vertex from a given vertexigraph::closeness()
. Because theigraph::closeness()
function interprets link weights as distances to calculate the shortest paths, this transforms the link weights (or the relative likelihood of pathogen or pest movement) in the adjacency matrix so that higher link weight values will be the shortest (or more likely) paths for pathogen or pest movement. -
degree()
: number of adjacent edgesigraph::degree()
. -
pagerank()
: page rank score for verticesigraph::page_rank()
.
Usage
nn_sum(crop_dm, ...)
node_strength(crop_dm, ...)
betweeness(crop_dm, ...)
ev(crop_dm, ...)
degree(crop_dm, ...)
closeness(crop_dm, ...)
pagerank(crop_dm, ...)
Arguments
crop_dm |
A square adjacency matrix, in which rows and columns names represent nodes (or locations) and
each entry indicate the relative likelihood of pathogen or pest movement between a pair of nodes.
In the internal workflow,
the adjacency matrix comes as a result of operations within |
... |
arguments to corresponding funtions in |
Value
SpatRaster. Representing connectivity of each node or location.
References
Csardi G, Nepusz T (2006). “The igraph software package for complex network research.” InterJournal, Complex Systems, 1695. https://igraph.org.
See Also
Other metrics:
supported_metrics()