jespermaag / gganatogram

Create anatograms using ggplot2
379 stars 52 forks source link

not able to run gganatogram #10

Open juancresc opened 5 years ago

juancresc commented 5 years ago

I'm getting this error

Error: GeomPolypath was built with an incompatible version of ggproto.
Please reinstall the package that provides this extension.
> grid.arrange(hgMale,ncol=1)
Error: could not find function "grid.arrange"

This is my script


devtools::install_github("jespermaag/gganatogram")
library(gganatogram)
library(dplyr)
devtools::install_github("dkahle/ggmap")
devtools::install_github("hadley/ggplot2")
install.packages("gridExtra")
library(gridExtra)
hgMale <- gganatogram(data=hgMale_key, fillOutline='#a6bddb', organism='human', sex='male', fill="colour") + theme_void()
grid.arrange(hgMale,ncol=1)

Maybe I'm not installing the packages correctly

jespermaag commented 5 years ago

Hm,

What version of R and ggplot2 do you use? Can you post your sessionInfo()

Here's mine:

R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

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] gridExtra_2.3      gganatogram_0.1.0  ggpolypath_0.1.0   ggplot2_3.0.0.9000

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.18     withr_2.1.2      dplyr_0.7.6      assertthat_0.2.0
 [5] grid_3.5.0       plyr_1.8.4       R6_2.2.2         gtable_0.2.0    
 [9] magrittr_1.5     scales_1.0.0     pillar_1.2.3     rlang_0.2.2     
[13] lazyeval_0.2.1   bindrcpp_0.2.2   labeling_0.3     tools_3.5.0     
[17] glue_1.3.0       purrr_0.2.5      munsell_0.5.0    compiler_3.5.0  
[21] pkgconfig_2.0.1  colorspace_1.3-2 tidyselect_0.2.4 bindr_0.1.1     
[25] tibble_1.4.2    
juancresc commented 5 years ago

Sure

> session_info()
Error: could not find function "session_info"
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS  10.13.4

locale:
[1] C

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

other attached packages:
[1] gridExtra_2.3      dplyr_0.7.6        gganatogram_0.1.0 
[4] ggpolypath_0.1.0   ggplot2_3.0.0.9000

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.18     withr_2.1.2      crayon_1.3.4     assertthat_0.2.0
 [5] grid_3.3.2       plyr_1.8.4       R6_2.2.2         gtable_0.2.0    
 [9] magrittr_1.5     scales_0.5.0     pillar_1.3.0     rlang_0.2.1     
[13] lazyeval_0.2.1   rstudioapi_0.7   bindrcpp_0.2.2   tools_3.3.2     
[17] glue_1.3.0       purrr_0.2.5      munsell_0.5.0    pkgconfig_2.0.1 
[21] colorspace_1.3-2 tidyselect_0.2.4 bindr_0.1.1      tibble_1.4.2  
jespermaag commented 5 years ago

Can you try update R? Or remove ggplot2. It should be installed with gganatogram, but you're installing it again after.

muschellij2 commented 5 years ago

Try devtools::session_info() to get a full description of the session information.

cenuno commented 5 years ago

On my Mac I resolved that ggproto error with the following:

# install necessary package ----
install.packages("devtools")

# install the following packages from GitHub ------
lapply(X = c("thomasp85/ggforce", "thomasp85/ggraph"
                  , "slowkow/ggrepel", "hadley/ggplot2"
                  , "dkahle/ggmap")
       , FUN = devtools::install_github)

This comes after reading https://github.com/thomasp85/ggraph/issues/10#issuecomment-260935399.