ggproto compatibility error
aakarner opened this issue · 6 comments
aakarner commented
I've installed ggsn 0.4.6 and ggplot2 2.2.1.9000. When I try to run the example code:
library(ggsn); library(sf)
dsn <- system.file('extdata', package = 'ggsn')
# Map in geographic coordinates
map <- st_read(dsn, 'sp', quiet = TRUE)
ggm1 +
blank() +
north(map) +
scalebar(map, dist = 5, dd2km = TRUE, model = 'WGS84')
I get:
Error: GeomCustomAnn was built with an incompatible version of ggproto.
Please reinstall the package that provides this extension.
My session info:
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] sf_0.5-5 ggsn_0.4.6 ggplot2_2.2.1.9000
oswaldosantos commented
What version of ggmap are you using?
aakarner commented
Looks like 2.6.1.
oswaldosantos commented
I am not being able to reproduce your error neither in ubuntu nor in windows. Your definition of ggm1
is as the following?
(ggm1 <- ggplot(map, aes(fill = nots)) +
geom_sf())
aakarner commented
Yes, that's right.
I just tried it on a different windows computer with the exact same packages installed and it worked as expected without the error - I'm not sure precisely what that implies.
oswaldosantos commented
I don't either. I would reinstall R and theses packages. If you do it, let me know if that fix the problem.
aakarner commented
Reinstalling ggmap, ggplot2, and sf fixed the problem.