View source: R/centrality_measures.R
| net_centrality | R Documentation |
Computes centrality measures from a netobject,
netobject_group, mcml, or cograph_network. The built-in
measures match tna::centralities() without importing tna or
igraph. The only intentional default difference is that
Diffusion is range-normalized by default.
net_centrality(
x,
measures = NULL,
loops = FALSE,
normalize = FALSE,
invert = TRUE,
normalize_diffusion = TRUE,
centrality_fn = NULL,
...
)
x |
A |
measures |
Character vector. Centrality measures to compute.
Defaults to |
loops |
Logical. Include self-loops (diagonal) in computation?
Default: |
normalize |
Logical. Range-normalize all requested measures using the
same transformation as |
invert |
Logical. Invert weights for shortest-path measures?
Default: |
normalize_diffusion |
Logical. Range-normalize |
centrality_fn |
Optional function. Custom centrality function that takes a weight matrix and returns a named list of centrality vectors. |
... |
Additional arguments (ignored). |
For a netobject: a net_centrality data frame with
node names as rows, a state column, and one column per centrality
measure. For a netobject_group: a net_centrality_group
list of such data frames.
seqs <- data.frame(
V1 = c("A","B","A","C"), V2 = c("B","C","B","A"),
V3 = c("C","A","C","B"))
net <- build_network(seqs, method = "relative")
net_centrality(net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.