I would like to render a rmarkdown as pdf that as some html (leaflet) in it.
Here is the YAML header:
date: '2022-07-29'
output: pdf_document
always_allow_html: true
My markdown would not render as pdf unless I included the "always_allow_html". However, the leaflet plots I want to show up are not showing up in the pdf format. Here is a snippet of code of the plot:
```{r map_of_schools, fig.height= 5, fig.width= 5, message=FALSE}
map <- leaflet() %>%
addTiles() %>%
addCircleMarkers(
data = safepassageschools,
color = ~pal(treatment),
radius = 0.5) %>%
addLegend(
colors = c("red", "blue"),
labels = c("Did Not Participate", "Participated"),
title = "Participation in Safe Passage Program",
position = "bottomleft"
)
map