Type: | Package |
Title: | Distinctiveness Centrality |
Version: | 1.0.1 |
Description: | Calculates Distinctiveness Centrality in social networks. For formulas and descriptions, see Fronzetti Colladon and Naldi (2020) <doi:10.1371/journal.pone.0233276>. |
License: | MIT + file LICENSE |
URL: | https://github.com/iandreafc/distinctiveness-R, https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0233276 |
Depends: | R (≥ 3.5.0) |
Imports: | igraph |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-10-15 14:58:40 UTC; IV |
Author: | Andrea Fronzetti Colladon [aut, cre], Luis Maas [aut] |
Maintainer: | Andrea Fronzetti Colladon <andrea.fronzetticolladon@unipg.it> |
Repository: | CRAN |
Date/Publication: | 2023-10-15 15:10:02 UTC |
The main function; oversees the calculations of Distinctiveness Centrality
Description
The main function; oversees the calculations of Distinctiveness Centrality
Usage
distinctiveness(
G,
alpha = 1,
normalize = FALSE,
measures = c("D1", "D2", "D3", "D4", "D5")
)
Arguments
G |
the given graph |
alpha |
the given exponent for penalizing connections to highly connected nodes |
normalize |
when TRUE, the function normalizes output metrics to allow for comparison with other graphs. Defaults to FALSE |
measures |
the measures of Distinctiveness Centrality to be computed |
Value
a data frame containing the specified calculated measures of Distinctiveness Centrality for the given graph
Examples
g <- igraph::erdos.renyi.game(20, 50, type = "gnm", directed = FALSE)
plot(g)
distinctiveness(g)
distinctiveness(g, alpha = list(2, 1, 3, 2, 4), measures = c("D1", "D3", "D4"))
g_dir <- igraph::erdos.renyi.game(20, 50, type = "gnm", directed = TRUE)
plot(g_dir)
distinctiveness(g_dir)
distinctiveness(g_dir, alpha = 2, normalize = TRUE, measures = c("D2", "D5"))