geeklhem / rnetcarto

Fast network modularity and roles computation by simulated annealing (rgraph C library wrapper for R).
4 stars 5 forks source link

Trivial graph error if the rows are unnamed. #9

Open geeklhem opened 8 years ago

geeklhem commented 8 years ago

If you feed an adjacency matrix for a bipartite graph without giving names to the rows you

Error in netcarto(web = adj, bipartite = TRUE) :  Trivial graph 
(less than 2 nodes or 1 edge)."

A workaround in the meantime is to name the rows:

rownames(adj) = 1:nrow(adj)

And you should have the correct behavior.