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:
#
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
Pablo source share