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

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

Arguments

P

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

names

String with potential names of nodes used in the plot (optional).

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.

Value

a ggplot object.

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.

See also

rank_intervals

Examples

require(igraph) require(ggplot2)
#> Loading required package: 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) # }