Reputation: 726
I would like to be able to save and then load my highcharts graphs created with highcharter in R.
I have tried using the save
function in R.
save(graph1, file="new_graph.rda")
then
x=load("new_graph.rda")
, the object x is a character string called
with the value graph1
.I have also tried to use the htmlwidgets::saveWidget(graph1, file="html_graph.html")
, and then pull it back in using graph2 = htmltools::includeHTML("html_graph.html")
but this just gives me the text html and doesnt render the graph.
I tried to render it using htmlwidgets::createWidget("widget", graph2)
, but I just get a blank screen.
How can I save and then load in highcharts graphs?
Upvotes: 0
Views: 331
Reputation: 1619
Instead of using x=load("new_graph.rda")
try load("new_graph.rda")
.
Cheers, Rico
Upvotes: 1