title: Flexdashboards and Leaflet and marker click with Highcharts
body: <p>I am attempting to create a flexdashboard that uses an event (map_marker_click) in Leaflet to show a highcharts column chart in another chart on the same page.  I have taken from other examples and cannot find quite what I am looking for in the Flexdashboards tutorials or examples.  <a href="https://github.com/walkerke/neighborhood_diversity/blob/master/neighborhood_diversity.Rmd">This</a> is very close to what I am wanting without the shiny inputs or plot.ly integration and using markers instead of polygons (much less going on).  </p>
  
  <p>I have the following code for a flexdashboard in R:</p>
  
  <pre><code>title: "Flexdashboards and Leaflet"
  output: 
  flexdashboard::flex_dashboard:
  vertical_layout: fill
  runtime: shiny
  ---
  
  ```{r,include=FALSE}
  library(flexdashboard)
  library(shiny)
  library(leaflet)
  library(highcharter)
  ```
  
  ```{r,include=FALSE}
  latitude&lt;-c(35.94077, 35.83770, 35.84545, 35.81584, 35.79387, 36.05600)
  longitude&lt;-c(-78.58010, -78.78084, -78.72444, -78.62568, -78.64262,-78.67600)
  amounts1&lt;-c(27, 44, 34, 46, 25, 15)
  amounts2&lt;-c(34, 52, 35, 78, 14, 24)
  ids&lt;-c("a", "b", "c", "d", "e", "f")
  df&lt;-data.frame(ids,amounts1,amounts2,latitude,longitude)
  renderLeaflet({ 
  leaflet() %&gt;%
  addTiles() %&gt;%
  addMarkers(lng=c(longitude),lat=c(latitude))
  }) 
  
  observeEvent(input$map_marker_click,{
        click&lt;-input$map_marker_click
        if(is.null(click))
          return()
  }) 
  ```
  
  ```{r}
  renderHighchart({
  highchart() %&gt;%
  hc_chart(type = 'column')%&gt;%
  hc_add_series(name=amounts1, data=click())
  hc_add_series(name=amounts2, data=click())
  })
  ```
  </code></pre>
  
  <p>I am wondering if this could be accomplished in a flexdashboard with or without shiny integration.  </p>