briatte / ggnet

Network visualization with ggplot2
https://briatte.github.io/ggnet/
194 stars 33 forks source link

Error in vignette: 1d atomic vector or list #27

Closed natemiller closed 7 years ago

natemiller commented 7 years ago

I've tried to run the first few lines of the ggnet2 vignette when I can an error stating that Each variable must be a 1d atomic vector or list. I'm not clear on what this is referencing. I can generated the net variable

net = rgraph(10, mode = "graph", tprob = 0.5)
net = network(net, directed = FALSE)

# vertex names
network.vertex.names(net) = letters[1:10]

which ends up being this

>net
 Network attributes:
  vertices = 10 
  directed = FALSE 
  hyper = FALSE 
  loops = FALSE 
  multiple = FALSE 
  bipartite = FALSE 
  total edges= 28 
    missing edges= 0 
    non-missing edges= 28 

 Vertex attribute names: 
    vertex.names 

No edge attributes

However, when I try to run..

ggnet2(net)

I get an error Error: Each variable must be a 1d atomic vector or list. Problem variables: 'x', 'y', 'xend', 'yend'

I haven't been able to track down a reason for this error or why it is arising from the vignette. I have ggplot v. 2.2.1, GGally 1.3.0, both sna2.4 and network 1.13, and scales 0.4.1.

Any insights into what I might be missing would be appreciated.

natemiller commented 7 years ago

Sorry...ggplot2 was corrupted and had to rebuild. Appears to work now. Sorry