sna

How to create a bipartite network in R with igraph or tnet

帅比萌擦擦* 提交于 2019-11-27 08:47:30
I have an edgelist for a two mode network, similar to this: person Event Amy football_game Sam picnic Bob art_show I want to perform an analysis on this in R, but seemingly everything I try fails. Converting it to a one mode network runs into memory limitations, and I can't figure out how to analyze it as bipartite in either igraph or tnet. In igraph, bipartite.projection gives me all FALSE , on the igraph object created using net <- graph.edgelist(myobject) On tnet, I can't convert the igraph net to a tnet one, and when I try to use the original data frame, it refuses because of duplicates in

How to create a bipartite network in R with igraph or tnet

旧时模样 提交于 2019-11-26 14:09:38
问题 I have an edgelist for a two mode network, similar to this: person Event Amy football_game Sam picnic Bob art_show I want to perform an analysis on this in R, but seemingly everything I try fails. Converting it to a one mode network runs into memory limitations, and I can't figure out how to analyze it as bipartite in either igraph or tnet. In igraph, bipartite.projection gives me all FALSE , on the igraph object created using net <- graph.edgelist(myobject) On tnet, I can't convert the

Subscript out of bounds - general definition and solution?

别等时光非礼了梦想. 提交于 2019-11-26 11:37:26
When working with R I frequently get the error message "subscript out of bounds". For example : # Load necessary libraries and data library(igraph) library(NetData) data(kracknets, package = "NetData") # Reduce dataset to nonzero edges krack_full_nonzero_edges <- subset(krack_full_data_frame, (advice_tie > 0 | friendship_tie > 0 | reports_to_tie > 0)) # convert to graph data farme krack_full <- graph.data.frame(krack_full_nonzero_edges) # Set vertex attributes for (i in V(krack_full)) { for (j in names(attributes)) { krack_full <- set.vertex.attribute(krack_full, j, index=i, attributes[i+1,j])

Subscript out of bounds - general definition and solution?

懵懂的女人 提交于 2019-11-26 03:32:38
问题 When working with R I frequently get the error message \"subscript out of bounds\". For example: # Load necessary libraries and data library(igraph) library(NetData) data(kracknets, package = \"NetData\") # Reduce dataset to nonzero edges krack_full_nonzero_edges <- subset(krack_full_data_frame, (advice_tie > 0 | friendship_tie > 0 | reports_to_tie > 0)) # convert to graph data farme krack_full <- graph.data.frame(krack_full_nonzero_edges) # Set vertex attributes for (i in V(krack_full)) {