Error: ScalesList was created with an incompatible version of ggproto

I am making a presentation in slidfy using the deckjs framework. Everything was fine, but suddenly this piece 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) 

stops working and instead displays this error:

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

The code works fine when executed from a source or console ... But it no longer works with markdown R. Function failed - stat_smooth (). The rest is rendered ok if executed without a smooth one.

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

thanks

+5
source share
4 answers

It is very strange; now everything is back to normal.

I did what @baptiste suggested, and the R source code just worked fine. After that, I tied Rmarkdown again and the error went away!

0
source

I had a similar problem in RMarkdown after updating ggplot2. I downloaded a workspace with graphs created with an older version of ggplot2. The solution was to recreate this workspace with an updated version, and RMarkdown now works.

+4
source

in February 2017, the same error was resolved by reinstalling all packages (RStudio - Tools - Check for package updates)

0
source

I had a similar problem with geom_tufteboxplot . First I updated the ggplot2 and ggthemes package, then disconnected all the packages related to ggplot and reloaded them. It worked for me.

0
source

Source: https://habr.com/ru/post/1261844/


All Articles