Package 'distinctiveness'

Title: Distinctiveness Centrality
Description: Calculates Distinctiveness Centrality in social networks. For formulas and descriptions, see Fronzetti Colladon and Naldi (2020) <doi:10.1371/journal.pone.0233276>.
Authors: Andrea Fronzetti Colladon [aut, cre], Luis Maas [aut]
Maintainer: Andrea Fronzetti Colladon <[email protected]>
License: MIT + file LICENSE
Version: 1.0.1
Built: 2025-03-09 02:55:14 UTC
Source: https://github.com/iandreafc/distinctiveness-r

Help Index


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"))