igraph

Find immediate neighbors by group using data table or igraph

人走茶凉 提交于 2021-02-08 12:22:46
问题 I have a data.table : groups <- data.table(group = c("A", "B", "C", "D", "E", "F", "G"), code_1 = c(2,2,2,7,8,NA,5), code_2 = c(NA,3,NA,3,NA,NA,2), code_3 = c(4,1,1,4,4,1,8)) group code_1 code_2 code_3 A 2 NA 4 B 2 3 1 C 2 NA 1 D 7 3 4 E 8 NA 4 F NA NA 1 G 5 2 8 What I would like to achieve, is for each group to find the immediate neighbors based on the available codes. For example: Group A has immediate neighbors groups B, C due to code_1 (code_1 is equal to 2 in all groups) and has

compare communities from graphs with different number of vertices

限于喜欢 提交于 2021-02-08 04:45:58
问题 I am calculating louvain communities on graphs of communications data, where vertices represent performers on a big project. The graphs represent different communication methods (e.g., email, phone). We want to try to identify teams of performers from their communication data. Since performers have preferences for different communication methods, the graphs are of different sizes and may have some unique vertices which may not be present in both. When I try to compare the community objects

Weighted Bimodal Bipartite Graph Projection conserving original weights

我的梦境 提交于 2021-02-08 03:08:15
问题 I have a large ( 36k vertices, 50k edges ) weighted bimodal bipartite graph and I would like to generate a projection that not only count the neighbors like the default weighted implementation but also sum the weights on the edges. You can think of it as a bipartite graph containing black vertices and blue vertices, where I want to conserve the original graph weights when there are only blue vertices. The implementations I came across keep the orange value, I am interested on the red one (or

Weighted Bimodal Bipartite Graph Projection conserving original weights

泄露秘密 提交于 2021-02-08 03:05:24
问题 I have a large ( 36k vertices, 50k edges ) weighted bimodal bipartite graph and I would like to generate a projection that not only count the neighbors like the default weighted implementation but also sum the weights on the edges. You can think of it as a bipartite graph containing black vertices and blue vertices, where I want to conserve the original graph weights when there are only blue vertices. The implementations I came across keep the orange value, I am interested on the red one (or

How to create a polar network graph (multiple rings) in igraph & R

主宰稳场 提交于 2021-02-08 02:56:06
问题 I have a graph with <100 nodes, with several categories. I would like the nodes belonging to one category to be in the center, with the other nodes arranged evenly in a circle around the outside - like a star graph, but with multiple nodes in the center. NodeXL calls this a polar graph (see: http://www.connectedaction.net/2013/03/03/how-to-plot-a-network-in-a-polar-layout-using-nodexl/) Given this data from the manual for graphs from dataframes: actors<-data.frame(name=c("Alice", "Bob",

Grouping iGraph Vertices in a weighted network by color/subgroup in R

寵の児 提交于 2021-02-08 02:08:16
问题 I am struggling to group my network by the subgroups. I currently have the following network: Current Network Which I have assigned the subgroups. I would like to plot all of the subgroups clustered together. To get a graph that looks like this: Goal Most algorithms seems to cluster based on weights in the graph. But I want to tell it to cluster based on the node colors/labelled subgroups. This is what I have now to code this network: #Graph with Weighted matrix g_weighted<-graph.adjacency

Grouping iGraph Vertices in a weighted network by color/subgroup in R

假如想象 提交于 2021-02-08 02:08:01
问题 I am struggling to group my network by the subgroups. I currently have the following network: Current Network Which I have assigned the subgroups. I would like to plot all of the subgroups clustered together. To get a graph that looks like this: Goal Most algorithms seems to cluster based on weights in the graph. But I want to tell it to cluster based on the node colors/labelled subgroups. This is what I have now to code this network: #Graph with Weighted matrix g_weighted<-graph.adjacency

R visNetwork: Multiple graph layout?

邮差的信 提交于 2021-02-07 20:21:05
问题 I would like to position two visNetwork plots side-by-side for visual comparison. Multi-plot positioning is possible using igraph with par() or layout(). Is there a way to do this for visNetwork? Work-arounds/kludges (including RShiny, etc.) are acceptable answers - whatever works to provide a side-by-side visNetwork display. Note that ID numbers etc. overlap, so putting both networks into the same graph would be a lot of data manipulation that I wish to avoid. Here is an example of the type

R visNetwork: Multiple graph layout?

☆樱花仙子☆ 提交于 2021-02-07 20:20:29
问题 I would like to position two visNetwork plots side-by-side for visual comparison. Multi-plot positioning is possible using igraph with par() or layout(). Is there a way to do this for visNetwork? Work-arounds/kludges (including RShiny, etc.) are acceptable answers - whatever works to provide a side-by-side visNetwork display. Note that ID numbers etc. overlap, so putting both networks into the same graph would be a lot of data manipulation that I wish to avoid. Here is an example of the type

Visualizing the result of dividing the network into communities

送分小仙女□ 提交于 2021-02-07 20:19:38
问题 The dataset is included the network matrix and attribute data frame. Network dataset has 3 data set itself, that I just want to work on PrinFull dataset and also just PRIN attribute data. my data is uploaded in this two link below. I added all attribute on my data set. https://drive.google.com/file/d/1MZCdeAZF0joIQLwVeoVXmKpf7r8IJ2wq/view?usp=sharing https://drive.google.com/file/d/1I96BAUo8TjJMWCWpn_SIhp54snfZ0Bd5/view?usp=sharing I want to plot my community detection algorithm, the code is