I am getting the following error when trying to open an html document put together with knitr in Mozilla Firefox. The error is a result of the graph element composed with the plotly
package.
unknownError: error occurred while processing
'getCachedMessages: out of memory
The entire contents of the rmarkdown file (default everything else):
library(plotly)
library(ggplot2)
theData <- data.frame(A=1:26, B=letters, C=rnorm(26,19))
g<-ggplot(theData, aes(x=A, y=C)) +
geom_point()
ggplotly(g)
I have the most recent version of Firefox. I don't seem to have trouble viewing other pages with plotly elements on them. The page works in IE, no problem.
(apologies - I do not have enough points to respond in comments)
I get same problem with R + Rmd + plotly + Firefox (but no issue with IE or Opera). The following issues have been raised at Github / ropensci / plotly - but no solutions as of 2017-01-20 :
- plotly + FlexDashboard + Firefox = huge memory consumption #721
- Very bad performance of RMarkdown in Firefox #483
- R library: Big slowdown in Firefox but not in Chrome #17 (github / plotly / plotly.js / issues / 17)
So far (2018-05-08) it seems that this issue persists. But there is a workaround which cpsievert mentions on GitHub (see camelCase's answer for the links).
You have to add self_contained: false
to the YAML header like this:
---
title: "Your title"
output:
html_document:
self_contained: false
---
The problem with this hack is that you will no longer have a standalone .html file. Please, see the topic Document Dependencies at https://rmarkdown.rstudio.com/html_document_format.html for more details.