I'm trying to create an HTML Rmarkdown that runs many plotly graphs... The issues in the HTML file is too big and can't open it.
I found out that I can use "partial_bundle" function to reduce the size of my file. On my home computer it works great.
I created the following file:
```{r pressure, echo=FALSE, error=TRUE}
dta = data.frame(x= rnorm(1000), y = rnorm(1000))
plot_ly(dta, x=~x,y=~y)
```
Its size is ~5Mb and when I add the funtion "partial_bundle":
```{r pressure, echo=FALSE, error=TRUE}
dta = data.frame(x= rnorm(1000), y = rnorm(1000))
plot_ly(dta, x=~x,y=~y) %>%
partial_bundle()
```
The size reduces to ~2.5Mb which is great.
The issues is in my work environment, the function doesn't work because it seems like it needs to access a server that it's blocked in my work:
It there a way to use it offline? There is a description here of the function but I dont get how to use it offline on Rmarkdown..
Edit: My end goal is to know how use the js script on barchart plotlys... I need help implementing the js files in my rmarkdown...