title: R Mapping Makes Messy, Ungrouped Borders, but only when data frame is merged with shape data frame
body: <p>I'm trying to map some spatial data, and I'm getting a weird result that I haven't seen asked and answered before. </p>
  
  <p>I pull in the shape data like so (with intermediate steps to match precinct IDs to the ObjectIDs elided):</p>
  
  <pre><code>shp&lt;-readOGR('./2016 precincts', '2016_Precincts')
  shp&lt;-spTransform(shp, CRS("+proj=longlat +datum=WGS84"))
  shp&lt;-tidy(shp)
  </code></pre>
  
  <p>When I do the following:</p>
  
  <pre><code>ggmap(map)+geom_polygon(aes(x=long, y=lat,group=group), size=.1, color=borderColor, data=testShp, alpha=0.5)
  </code></pre>
  
  <p>I get a nice, blank map of the precincts. However, once I merge in any data and try to fill in the precincts, like this:</p>
  
  <pre><code>shp&lt;-merge(shp, precinctTotals, by.x='vtds', by.y='precinct',all.x=T)
  </code></pre>
  
  <p>the border lines stop drawing correctly. I can't figure out why. It appears that the only thing that changes is that there is additional data in the data frame. Has anyone experienced this before?</p>