title: R Leaflet Map Polygon Labels on highlight have incorrect label
body: <p>I am creating a map in R using leaflet and the labels for my polygons are not lining up with what their value should be.</p>
  
  <p>The map is meant to separate just Ontario by FSA (<a href="https://www.ic.gc.ca/eic/site/bsf-osb.nsf/eng/br03396.html" rel="nofollow noreferrer">Forward Sortation Area</a>), the geojson includes all the FSAs in Canada. </p>
  
  <p>So first I subset just the FSAs for Ontario (Using their first letter as this is how FSAs work).</p>
  
  <pre class="lang-r prettyprint-override"><code>
  file_path &lt;- "data/regions.geojson"
  
  fsa &lt;- geojsonio::geojson_read(
    x=file_path,
    what="sp"
  )
  
  #Get subsets
  fsa_ont &lt;-subset (
    x=fsa,
    subset= grepl(
      x=fsa@data$CFSAUID,
      pattern="^L|^M|^P|^K|^N"  
  
    )
  )
  </code></pre>
  
  <p>The map is also supposed to highlight each FSA by the number of people from that FSA who are in the data. I create a colour palette based on the count of people by the FSA. The colour palette seems to work based on the labels it ends up giving the polygons. </p>
  
  <pre class="lang-r prettyprint-override"><code>#create a colour palette
  
  mypalette &lt;- colorBin(palette=c("#8acb88", "#FF9933", "#990033"),  domain= pop$Count, bins=c(1,5,10,15),  na.color='white')
  
  </code></pre>
  
  <p>Next a create the map tiles</p>
  
  <pre class="lang-r prettyprint-override"><code>map &lt;- leaflet::leaflet() %&gt;%
    leaflet::addProviderTiles(providers$OpenStreetMap)
  </code></pre>
  
  <p>Then I create the text for my label. </p>
  
  <p>This was a label to check what was going wrong. It should be showing the FSA pulling from the geojson data, then the FSA it is pulling from my data set, and then the count from the data set. </p>
  
  <p>The count and the FSA from my data set <strong>match each-other</strong> on each label, but they <strong>do not match the FSA from the geojson</strong>. <em>Neither FSA matches what the real name of the polygon should be.</em> </p>
  
  <pre class="lang-r prettyprint-override"><code>mytext=paste("FSA Ont Data: ", fsa@data$CFSAUID, "FSA Ours:", pop$FSA,"Count: ", pop$Count)
  </code></pre>
  
  <p>This is creating the map with my polygons, seems to work well. </p>
  
  <pre class="lang-r prettyprint-override"><code>map_fsa&lt;- map %&gt;%
    leaflet::addPolygons(
      data=fsa_ont,
      weight=1,
      opacity=3,
      color="white",
      dashArray="3",
    ##  fillColor= ~mypalette(pop$Count),
    ##  fillOpacity=.7,
      highlight = highlightOptions(
        weight = 2,
        color = "#666",
        dashArray = "",
        fillOpacity = 4,
        bringToFront = TRUE
        ),
      label= mytext)%&gt;%
    addLegend("bottomright", pal = mypalette, values = pop$Count,
                          title = "Survey Respondents",
                          opacity = 1)
  
  map_fsa
  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/k1J6a.png" rel="nofollow noreferrer">Picture of output, and a polygon label</a>
  <a href="https://i.stack.imgur.com/tjRE3.gif" rel="nofollow noreferrer">Picture of Northern Ontario FSAs</a>
  This is the output of the code: See how the label not only doesn't match the correct FSA for the region but the geojson and my data do not seem to match either. The colour does seem to be correct. </p>
  
  <p>Please give me some guidance!</p>
  
  <p>Edit: I've looked up solutions to this and the closet i've found was <a href="https://stackoverflow.com/questions/52077636/how-to-access-polygon-information-from-shapefile-leaflet-r/52092273#52092273">this question</a> but I cannot seem to make it work for my code. </p>