Learn R Programming

robin (version 1.0.0)

plotRobin: plotRobin

Description

This function plots two curves: the measure of the null model and the measure of the real graph.

Usage

plotRobin(
  graph,
  model1,
  model2,
  measure = c("vi", "nmi", "split.join", "adjusted.rand"),
  legend = c("model1", "model2"),
  title = "Robin plot"
)

Arguments

graph

The output of prepGraph

model1

The Mean output of the robinRobust function or the Mean1 output of robinCompare.

model2

The MeanRandom output of the robinRobust function or the Mean2 output of robinCompare.

measure

The stability measure: one of "vi", "nmi", "split.join", "adjusted.rand".

legend

The legend for the graph. The default is c("model1", "model2").

title

The title for the graph. The default is "Robin plot".

Value

A ggplot object.

Examples

Run this code
# NOT RUN {
my_file <- system.file("example/football.gml", package="robin")
graph <- prepGraph(file=my_file, file.format="gml")
graphRandom <- random(graph=graph)
Proc <- robinRobust(graph=graph, graphRandom=graphRandom, method="louvain",
type="independent")
plotRobin(graph=graph, model1=Proc$Mean, model2=Proc$MeanRandom,
measure="vi", legend=c("real data", "null model"))

# }

Run the code above in your browser using DataLab