Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot_rank_intervals

Plot rank intervals


Description

Compute rank intervals (minimal and maximal possible rank) and visualize them with ggplot.

Usage

plot_rank_intervals(P, cent.df, ties.method = "min")

Arguments

P

A partial ranking as matrix object calculated with neighborhood_inclusion or positional_dominance.

cent.df

A data frame containing centrality scores of indices (optional). See Details.

ties.method

String specifying how ties are treated in the base rank function.

Details

If a data frame of centrality scores is added, the respective ranks of nodes are shown in the intervals. Note that some points might fall outside of the intervals depending how ties are treated.

Value

a ggplot object.

Author(s)

David Schoch

See Also

Examples

library(igraph)
library(ggplot2)
g <- graph.empty(n=11,directed = FALSE)
g <- add_edges(g,c(1,11,2,4,3,5,3,11,4,8,5,9,5,11,6,7,6,8,
                   6,10,6,11,7,9,7,10,7,11,8,9,8,10,9,10))
P <- neighborhood_inclusion(g)
## Not run: plot_rank_intervals(P)

#adding index based rankings
cent_scores <- data.frame(
  degree = degree(g),
  betweenness = round(betweenness(g),4),
  closeness = round(closeness(g),4),
  eigenvector = round(eigen_centrality(g)$vector,4))
## Not run: plot_rank_intervals(P,cent.df=cent_scores)

netrankr

Analyzing Partial Rankings in Networks

v0.3.0
MIT + file LICENSE
Authors
David Schoch [aut, cre], Julian Müller [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.