View source: R/MK_RMCentrality.R
MK_RMCentrality | R Documentation |
Use this function to calculate radial and medial centrality measure under one or several distance thresholds.
MK_RMCentrality(
nodes,
distance = list(type = "centroid"),
distance_thresholds = NULL,
binary = TRUE,
probability = NULL,
rasterparallel = FALSE,
write = NULL,
intern = TRUE
)
nodes |
Object containing nodes (e.g., habitat patches or fragments) information. It can be of the following classes: |
distance |
A |
distance_thresholds |
A |
binary |
|
probability |
A |
rasterparallel |
|
write |
|
intern |
|
This function implements Patch-Scale Connectivity or Centrality Measures. Radial measures: degree, strength (using probability argument, for weighted graphs), eigenvector centrality (eigen), and closeness centrality (close). Medial measures: betweenness centrality (BWC), node memberships (cluster), and modularity (modules, using probability argument). The function builds on functions out of Csardi’s ’igraph’ package.
Borgatti, S. P., & Everett, M. G. (2006). A Graph-theoretic perspective on centrality. Social Networks, 28(4), 466–484. https://doi.org/10.1016/j.socnet.2005.11.005
Hanski, I. and Ovaskainen, O. 2000. The metapopulation capacity of a fragmented landscape. Nature 404: 755–758.
## Not run:
library(Makurhini)
library(sf)
data("habitat_nodes", package = "Makurhini")
nrow(habitat_nodes) # Number of patches
#Two distance threshold,
centrality_test <- MK_RMCentrality(nodes = habitat_nodes,
distance = list(type = "centroid"),
distance_thresholds = c(10000, 100000),
probability = 0.05,
write = NULL)
centrality_test
plot(centrality_test$d10000["degree"], breaks = "jenks")
plot(centrality_test$d10000["BWC"], breaks = "jenks")
plot(centrality_test$d10000["cluster"], breaks = "jenks")
plot(centrality_test$d10000["modules"], breaks = "jenks")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.