|
From: | lookman sanni |
Subject: | Re: [igraph] Multiplex networks: Edge type related metrics by node |
Date: | Thu, 4 Dec 2014 22:50:22 +0100 |
I am doing something like the below in one of my plots:
library(igraph)message("Select the edges list")el=read.csv(file.choose(),sep="|")el=as.matrix(el)g = graph.edgelist(el[,1:2],directed=FALSE)E(g)$Entries_Count = as.numeric(el[,4])E(g)$Entry_Type = el[,3]E(g)$color = E(g)$Entry_TypeE(g)$color = gsub("164","EType1",E(g)$color)E(g)$color = gsub("165","EType1",E(g)$color)E(g)$color = gsub("EType1","deepskyblue",E(g)$color)E(g)$color = gsub("EType2","orange",E(g)$color)E(g)$color = gsub("EType3","gray",E(g)$color)E(g)$color = gsub("EType4","green",E(g)$color)E(g)$color = gsub("EType5","red",E(g)$color)E(g)$color = gsub("EType6","blue",E(g)$color)E(g)$color = gsub("EType7","black",E(g)$color)message("Select the vertices list")nodeinfo=read.csv(file.choose(),sep="|")V(g)$Actor_Type = as.character(nodeinfo$Type[match(V(g)$name,nodeinfo$Name)])V(g)$Actor_Status = as.character(nodeinfo$status[match(V(g)$name,nodeinfo$Name)])V(g)$shape = V(g)$Actor_TypeV(g)$shape =gsub("NType1","none",V(g)$shape)V(g)$shape =gsub("NType2","sphere",V(g)$shape)V(g)$shape =gsub("NType3","pie",V(g)$shape)V(g)$color=V(g)$Actor_StatusV(g)$color=gsub("FormNType1","green",V(g)$color)V(g)$color=gsub("FormNType2","gray",V(g)$color)V(g)$color=gsub("FormNType3","orange",V(g)$color)mySize = V(g)$Actor_TypemySize = gsub("NType1","20",mySize)mySize = gsub("NType2","0",mySize)mySize = gsub("NType3","0",mySize)V(g)$size = as.numeric(mySize)V(g)$label.cex = 20tkplot.fit.to.screen(tkplot(g, vertex.shape=V(g)$shape, layout=layout.fruchterman.reingold,vertex.label=NA),width = NULL, height = NULL)
Sure...Will be doing that by the end of the day. No access at the moment to the hosting machine.On Thu, Dec 4, 2014 at 12:16 PM, Gábor Csárdi <address@hidden> wrote:Can you please show the code that is slow?GaborOn Thu, Dec 4, 2014 at 6:07 AM, lookman sanni <address@hidden> wrote:I have been using the default plot, and also Tkplot for a graph of 1K nodes, but with very low density (Less than 10 nodes having a significant local density actually). It takes between 3 and 5 minutes. I should however recognize that I am not using the appropriate material for that (an HP Envy).On Thu, Dec 4, 2014 at 11:45 AM, Gábor Csárdi <address@hidden> wrote:So subgraph.edges is slow for you? How long does it take?GaborOn Thu, Dec 4, 2014 at 5:09 AM, lookman sanni <address@hidden> wrote:I was not meaning, but rather fearing it may be. I will be dealing with networks of 20K nodes and 7 layers(subgraphs). I just need to make sure that I am making the most from the optimization opportunities that may exist.Thank you Fatemeh for the links. I will be looking into that as well.Regards,On Mon, Dec 1, 2014 at 5:25 PM, Fatemeh a <address@hidden> wrote:Hi,I searched a little some times ago on Multilayered network : you may find them helpful :and here : http://muxviz.net/ a framework is developed to deal with multilayered network : I didn't work with it and I have no idea whether you could combine these two package or not.Regards,FatemehOn Sat, Nov 29, 2014 at 1:52 AM, lookman sanni <address@hidden> wrote:_______________________________________________Hello everyone. I am new to SNA and learning how to use the igraph package. I have built a multiplex network from some flat file and would like to compute couple of metrics on top of that network:
- The number of edge types by node (multiplexity)
- A metric (matrix, contingent table) of edge types association between the same nodes (e.g: money transfer + good transfer: 20 pairs of nodes; money transfer + kinship: 120 pairs of nodes)
I have not seen any likely metrics in my web searches. Would I need to write them ? If yes, is there any available guideline on how to contribute to igraph ?--
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
--regardsF..A
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
--
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
--
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
--
[Prev in Thread] | Current Thread | [Next in Thread] |