Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ggmap Error: GeomRasterAnn was built with an incompatible version of ggproto

I'm using ggmap, and got the error below:

Error: GeomRasterAnn was built with an incompatible version of ggproto. Please reinstall the package that provides this extension. 

I've installed the latest version of both ggmap(2.6.1) and ggplot2(2.2.0), but still got the same error.

like image 566
dingding Avatar asked Nov 16 '16 21:11

dingding


2 Answers

I ran into this problem as well today, and I had to install the GitHub development versions of ggplot2 and ggmap and restart R to get rid of this error:

devtools::install_github("dkahle/ggmap") devtools::install_github("hadley/ggplot2") 

Before that, I also reinstalled all of the packages mentioned here: https://github.com/thomasp85/ggraph/issues/10

Don't know if those reinstalls were necessary, as it was ultimately installing the GitHub version of ggmap that fixed the problem, but thought I'd mention it just in case.

Note this problem appears to stem from the recent update to ggplot2 as discussed here: https://github.com/tidyverse/ggplot2/blob/master/NEWS.md#extensions

like image 188
jashu Avatar answered Sep 30 '22 01:09

jashu


Reinstalling ggmap from source code can fix the problem.

install.packages("ggmap", type = "source") 
like image 27
Cyrille Avatar answered Sep 30 '22 00:09

Cyrille