I'm trying to make a webpage with Rapache and "Leaflet for R". The main reason I did install Rapache is to use R inside of a html page (with brew). But, I cant figure out how to return my map inside the html page without saving it as a html extern file (which Rapache is useless). Lets take a exemple :
<%
library(leaflet)
m <- leaflet()
m <- addTiles(m)
m <- addMarkers(m, lng=174.768, lat=-36.852, popup="The birthplace of R")
m #Does not show anything
saveWidget(m, file = outPath, selfcontained = FALSE, libdir ='leafletwidget_libs') #work but not proper
%>
This is what I have in my html file and I would like to be able to return this map (m) and add it somewhere on my current page. The main reason I would like to do this is because I'm going to use this on a website and i would like it to be dynamic and not creating plenty of htmlfile. This is not really proper. Hope you can help me :) Thanks you !