View source: R/MK_BCentrality.R
MK_BCentrality | R Documentation |
Use this function to calculate the BC, BCIIC and BCPC indexes under one or several distance thresholds using Conefor command line.
MK_BCentrality(
nodes,
id,
attribute = NULL,
area_unit = "ha",
distance = list(type = "centroid", resistance = NULL),
metric = c("BC", "BCIIC", "BCPC"),
distance_thresholds = NULL,
probability = NULL,
LA = NULL,
coneforpath = NULL,
dA = FALSE,
dvars = FALSE,
parallel = 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: |
id |
|
attribute |
|
area_unit |
|
distance |
A |
metric |
A |
distance_thresholds |
A |
probability |
A |
LA |
|
coneforpath |
|
dA |
|
dvars |
|
parallel |
(optional, default = |
rasterparallel |
|
write |
|
intern |
|
To use this function you need to download and uncompress Conefor 2.6 with command line interface from http://www.conefor.org/coneforsensinode.html
Betweenness Centrality metrics can be calculated in three different ways:
- BC calculates the classical Betweenness Centrality metric as originally defined by Freeman (1977; Sociometry 40: 35–41).
- BCIIC and BCPC calculate the improved version of the BC metric by Bodin and Saura (2010) integrated within the same analytical framework as the IIC (binary) and the PC (probabilistic) metrics.
Saura, S. and Torne, J. (2012). Conefor 2.6. Universidad Politecnica de Madrid. Available at www.conefor.org.
Freeman L.C. (1977). Set of Measures of Centrality Based on Betweenness. Sociometry 40: 35-41.
Bodin, O. and Saura, S. (2010). Ranking individual habitat patches as connectivity providers: integrating network analysis and patch removal experiments. Ecological Modelling 221: 2393-2405.
## Not run:
library(Makurhini)
data("habitat_nodes", package = "Makurhini")
nrow(habitat_nodes) #Number of nodes
#Two distance thresholds.
#You need to place your path to the conefor .exe
BCIIC <- MK_BCentrality(nodes = habitat_nodes, id = "Id",
coneforpath = "C:/Users/coneforWin64.exe",
distance = list(type = "centroid"),
metric = "BCIIC", LA = NULL,
distance_thresholds = c(10000, 30000)) #10 and 30 km
#Using raster
data("habitat_nodes_raster", package = "Makurhini")
##Using parallel
BCPC_parallel <- MK_BCentrality(nodes = habitat_nodes_raster,
coneforpath = "C:/Users//coneforWin64.exe",
id = "id", attribute = NULL,
distance = list(type = "centroid"),
metric = "BCPC", LA = NULL, probability = 0.5,
distance_thresholds = 40000,
parallel = 4) #40 and 60 km
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.