0
votes

What I'm wondering is, would it be possible to create an HTML file from R ? I will be setting up R to work on the server side, and it will be making an heatmap overlay, and hopefully if it is possible to make an HTML file from R, I can just add in the image and set it up so it will be using Google maps, using the heatmap overlay.

This is the code I'm looking at and in there the overlay is given two coordinates, North east and south west, along with a center to specify where the map is.

In R when the overlay has been created, I can also save the coordinates, north east and south west along with the center of where the map should go. But what if I don't make the HTML file in R? How can I get these coordinates and delete previous overlay and place the new one on top and update it with the new coordinates?

1
Overlays can be added onto a Google Map in R as per this answer - SymbolixAU

1 Answers

0
votes

Yes, you can. It's simple if you use RStudio to build a RMarkdown with knitr.

http://yihui.name/knitr/

If you want to use the data in R, you can echo it and assign it to javascript variables and functions. Here's an example

http://al2na.github.io/Rmarkdown_JSviz/