I'm building some fairly complex maps with the
leaflet package and I'd like to embed them in an rmarkdown document (specifically an
ioslides_presentation .Rmd file).
Right now the code for the maps is in an .R script and it is subject to change as I tinker around with map aesthetics. I know I can cut and paste each map's code into the .Rmd presentation doc, but I want to avoid have to manually update the .Rmd file every time a change is made. I figure that if I can save the
leaflet output and embed it in the presentation that will be much smoother.
I know that
htmlwidgets::saveWidget allows me to save
leaflet maps. But how can I embed these outputs in the .Rmd presentation?