igraph

valued bipartite projection using R igraph

依然范特西╮ 提交于 2021-01-28 07:40:36
问题 I am trying to create valued bipartite projection from my data which looks like the following: Name rid Emile 17560 Lou 11800 Luther 11800 Tot 11800 Phineas 11800 Phineas 13580 Calvin 13580 Calvin 11800 Les 11800 Jeff 11800 Sonny 13580 Leon 13580 Red 13580 I imported the above data and call it data1 Then I do the following: ##create graph object from data1 graph1 <- graph.data.frame(data1) #check if it is bipartite is.bipartite(graph1) FALSE ##convert to bipartite graph V(graph1)$type <- V

What is the reason for bizarre R-igraph-spinglass result after several iterations?

戏子无情 提交于 2021-01-28 05:05:12
问题 I have used the spinglass algorithm in igraph to analyze clustering in networks. Since spinglass uses a stochastic method, the results can differ somewhat if we run the algorithm several times on one network. That's to be expected of course. However, I ran into one thing that I cannot explain. When we run spinglass on the same network-structure 1000 times, in 10 replications (so 10x1000 times), about 90% of the runs in replications 1-9 return 2 clusters: We run the spinglass estimation 1000

What is the reason for bizarre R-igraph-spinglass result after several iterations?

烈酒焚心 提交于 2021-01-28 05:03:09
问题 I have used the spinglass algorithm in igraph to analyze clustering in networks. Since spinglass uses a stochastic method, the results can differ somewhat if we run the algorithm several times on one network. That's to be expected of course. However, I ran into one thing that I cannot explain. When we run spinglass on the same network-structure 1000 times, in 10 replications (so 10x1000 times), about 90% of the runs in replications 1-9 return 2 clusters: We run the spinglass estimation 1000

Installing Cairo and PyCairo Mac OsX

狂风中的少年 提交于 2021-01-28 01:52:06
问题 I am playing around with using python iGraph for network visualization. I got his error message when I tried to plot a graph: >>> layout = g.layout("kk") >>> plot(g, layout = layout) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.5-x86_64/egg/igraph/drawing/__init__.py", line 446, in plot File "build/bdist.macosx-10.5-x86_64/egg/igraph/drawing/__init__.py", line 117, in __init__ File "build/bdist.macosx-10.5-x86_64/egg/igraph/drawing/utils

Why installed “igraph” package in R is showing error upon loading?

大城市里の小女人 提交于 2021-01-27 20:54:42
问题 I was trying to install the package igraph in R using the command install.packages("igraph"). After the installation, during testing phase it showed the following error: ** testing if installed package can be loaded Error: package or namespace load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/midhun/R/x86_64-redhat-linux-gnu-library/3.5/igraph/libs/igraph.so': libicui18n.so.58: cannot open shared object file: No such file or directory

extract a connected subgraph from a subset of vertices with igraph

吃可爱长大的小学妹 提交于 2021-01-27 08:52:40
问题 I have a graph G(V,E) unweighted, undirected and connected graph with 12744 nodes and 166262 edges. I have a set of nodes (sub_set) that is a subset of V. I am interested in extracting the smallest connected subgraph where sub_set is a part of this new graph. I have managed to get a subgraph where my subset of nodes is included but I would like to know if there is a way to minimise the graph. Here is my code (adapted from http://sidderb.wordpress.com/2013/07/16/irefr-ppi-data-access-from-r/)

extract a connected subgraph from a subset of vertices with igraph

大兔子大兔子 提交于 2021-01-27 08:51:31
问题 I have a graph G(V,E) unweighted, undirected and connected graph with 12744 nodes and 166262 edges. I have a set of nodes (sub_set) that is a subset of V. I am interested in extracting the smallest connected subgraph where sub_set is a part of this new graph. I have managed to get a subgraph where my subset of nodes is included but I would like to know if there is a way to minimise the graph. Here is my code (adapted from http://sidderb.wordpress.com/2013/07/16/irefr-ppi-data-access-from-r/)

Can import edgelist to igraph python

懵懂的女人 提交于 2021-01-27 06:32:34
问题 I have a list of twitter followers in text file that I want to import to iGraph. Here's the sample of my list 393795446 18215973 393795446 582203919 393795446 190709835 393795446 1093090866 393795446 157780872 393795446 1580109739 393795446 3301748909 393795446 1536791610 393795446 106170345 393795446 9409752 And this is how I import it from igraph import * twitter_igraph = Graph.Read_Edgelist('twitter_edgelist.txt', directed=True) But I get this error. ---------------------------------------

Can import edgelist to igraph python

↘锁芯ラ 提交于 2021-01-27 06:31:13
问题 I have a list of twitter followers in text file that I want to import to iGraph. Here's the sample of my list 393795446 18215973 393795446 582203919 393795446 190709835 393795446 1093090866 393795446 157780872 393795446 1580109739 393795446 3301748909 393795446 1536791610 393795446 106170345 393795446 9409752 And this is how I import it from igraph import * twitter_igraph = Graph.Read_Edgelist('twitter_edgelist.txt', directed=True) But I get this error. ---------------------------------------

igraph - adding text to community plot

谁说胖子不能爱 提交于 2021-01-27 06:13:18
问题 Using the code below I can generate a plot of the communities in the 'karate club' example provided by igraph (see first image). library(igraph) karate <- make_graph("Zachary") wc <- cluster_walktrap(karate) plot(wc, karate) How can I add a text label 'near' each of the communities? For this example, say I want to call the 5 different communities "Community X" (X = 1:5). Ideally, the code would place the text labels on the 'outside' of the colored community polygons to create a clear graph