Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ggnetwork plotting fails under dev version of ggplot2 #11

Closed
sctyner opened this issue Nov 1, 2016 · 1 comment
Closed

ggnetwork plotting fails under dev version of ggplot2 #11

sctyner opened this issue Nov 1, 2016 · 1 comment

Comments

@sctyner
Copy link

sctyner commented Nov 1, 2016

I'm sure you're already aware of this (probably received automatically generated emails from Hadley) but ggnetwork fails to plot because of the incompatibility with the new ggproto.

library(geomnet)
library(network)
library(ggnetwork)
data(blood, package = "geomnet")
ggplot(ggnetwork(network(blood$edges[, 1:2]),
                 layout = "circle", arrow.gap = 0.05),
       aes(x, y, xend = xend, yend = yend)) +
  geom_edges(color = "grey50",
             arrow = arrow(length = unit(10, "pt"), type = "closed")) +
  geom_nodes(size = 15, color = "darkred") +
  geom_nodetext(aes(label = vertex.names), color = "grey80") +
  theme_blank()
Error: StatEdges was built with an incompatible version of ggproto.
Please reinstall the package that provides this extension.
sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] network_1.13.0     ggnetwork_0.5.1    geomnet_0.1.2.2    ggplot2_2.1.0.9001

The paper revisions were just about complete when I got my notification from Hadley about the new ggplot2 version. We need to update our packages and put them on CRAN as soon as ggplot2 is released to that we can (finally) submit the paper.

@briatte briatte added this to the v0.5.2 milestone Nov 3, 2016
@briatte briatte self-assigned this Nov 3, 2016
@sctyner
Copy link
Author

sctyner commented Nov 4, 2016

Hello François!

I believe I have figured out this problem. If ggnetwork is installed when ggplot2 version 2.1.0 is installed in the library, this error arises. My solution was to reinstall ggnetwork, devtools::install_github("briatte/ggnetwork", force = TRUE), and the examples run fine.

In theory, any time this error shows up, the solution is to reinstall the package you're trying to use. The error message, then, is not as cryptic as I first thought!

Cheers,
Sam

@sctyner sctyner closed this as completed Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants