r - igraph package in RStudio: Bipartite graph projection error -


In an attempt to learn "mad and bolt" of social network theory within the igraph package, I made the Civil War of Algeria A basic toy example of a bilateral graph of terrorist attacks is done in collaboration with terrorist criminals and targets in the corner during one year, while representing the edges, the group which attacked the target.

I can plot the general liberalization graph of this relationship (as well as the central fundamental analysis of the network), but there is a problem in creating a bilateral projection of the network.

Tips per @ GaborCriser, I have only loaded the igraph package globally, to ensure that the sna or network package is not Conflict with order for Igraph.

Anyway, the problem persists:

  Library (igraph) criminal & lt; "Algerian Islamist extremist", "Salafist Group for", Muslim extremists "," Armed Islamic Group "," Sulfat Group for Preaching and Fitting (GSPC) "," Algerian Islamist Extremist "," Sulfur Group for "Preaching and Fighting (GSPC)", "Armed Islamic Group (GIA)", "Armed Islamic Group (GIA)", "Muslim Extremists"); Target (L); C ("Police", "Military", "Terrorists / Non -the state militia "," police "," san "Private citizens and property", "private citizens and property", "private citizens and property", "private citizens and property", "private citizens and property") - Cbind (criminal, target) net & lt ; - graph.edgelist (as.matri x (DAT)) plot (net, main = "domestic terrorism during the Algerian Civil War") V (net) $ type & lt; - wrong V (net) $ type [v )% Name %% dat $ perpetrator] & lt; - TRUE V (net) $ type [V (net) $ name %% dat $ target] - TRUE bipartite.mapping (net) proj_net & lt; - bipartite.projection (net, type = V (net)) $ then R)   

At what point, RStudio generates the following error:

  error. Call ("R_igraph_bipartite_projection", graph, type, as in Bipartite.c: 198: Non-bilateral increase found in bilateral projection, invalid value    

According to the documentation, bipartite.mapping (...)

If it is possible to do this, then the element in the list returned by $ type bipartite.mapping (...) reveals which Sub-network comes under each head (via correct or FALSE ). Note that for your graph, there are more than one way to do this.

It seems that you can define your sub-network yourself though normal As such, sub-networks are not necessarily bilateral while you are doing this, in your case they are. If you have to divide the net in sub-networks, bipartite.projection (. ..) can use:

  V (pure) $ type & lt; - Wrong V (net) $ type [v (net) $ name %% dat $ perpetrator) & lt; - TRUE proj_net & lt; - bipartite.projection (net)   

proj_net There is now a list with two elements, subgraphs.

If you want to use bipartite.mapping (...) to identify sub-networks, do this in this way:

  V (pure) $ type & lt; - bipartite.mapping (net) $ type proj_net & lt; - bipartite.projection (net) set.seed (123) # Transcriptable plot plot (pure, vertex.color = ifelse (v (pure) $ type, "green", "red"))   

It group together all targets , And not criminals, but the red and green subnetworks are bilateral

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -