plotRobin | R Documentation |
This function plots two curves: the measure of the null model and the measure of the real graph or the measure of the two community detection algorithms.
plotRobin( graph, model1, model2, legend = c("model1", "model2"), title = "Robin plot" )
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. |
legend |
The legend for the graph. The default is c("model1", "model2"). If using robinRobust is recommended c("real data", "null model"), if using robinCompare, enter the names of the community detection algorithms. |
title |
The title for the graph. The default is "Robin plot". |
A ggplot object.
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", measure="vi", type="independent") plotRobin(graph=graph, model1=Proc$Mean, model2=Proc$MeanRandom , legend=c("real data", "null model"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.