Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: ScalesList was built with an incompatible version of ggproto

I'm doing a presentation in slidfy, using the deckjs framework. Everything was ok, but suddenly this chunk of code:

ggplot(cars, aes(x = speed, y = dist)) +  geom_point(color = 'red') + stat_smooth(method = "lm", formula = y ~ x, size = 0.5, se = F)

stopped working and shows this error instead:

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

The code works perfectly when executed from source or console... But it doesn't work anymore from the R markdown. The function that fails is the stat_smooth(). The rest visualizes ok if executed without the smooth.

Here and here a similar error is reported, and the solution offered is to reinstall ggplot and the packages from github, but I'm not sure which packages should I install, and, besides, the code only fails from Rmarkdown, and not when executed from console or source.

Thanks

like image 863
Pablo Avatar asked Dec 24 '16 17:12

Pablo


1 Answers

I had a similar problem in RMarkdown after updating ggplot2. I was loading a workspace with plots created with the older version of ggplot2. The solution was to recreate that workspace with the updated version, and now RMarkdown works.

like image 86
user7599321 Avatar answered Nov 17 '22 22:11

user7599321