I have created a flexdashboard that includes a map using the leaflet package.
I need to be able to select markers within a region of the map so that I can display summary statistics based upon those markers. leaflet-locationfilter appears to provide what I need, but I need to figure out how to include this in the generated HTML file. I have tried using "includes" in the flexdashboard header but this produces an error. Here is a simple test case:
---
title: "Dashboard Title"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
includes: includes(in_header = "TEST.HTML", before_body = "TEST.HTML", after_body = "TEST.HTML")
---
...where TEST.HTML is:
<!-- TEST TEST TEST -->
But this fails with:
output file: Dashboard.knit.md
Error in includes$in_header : $ operator is invalid for atomic vectors Calls: -> -> overlay -> pandoc_include_args Execution halted
I have had to resort to reading the code to figure out how to do this because it doesn't appear to be documented anywhere, but I've obviously missed something.
Any suggestions?