title: How to remove NA from facet_wrap in ggplot2?
body: <p>I am trying to use facet_wrap to make a polygon map in ggplot2. I have two factor levels (soybean, Maize) in my variable "crop" However, I am getting three plots: soybean, maize and one with NA values. In addition NA values are not displayed in the first two facets-</p>
  
  <p>here is my code to make the map:</p>
  
  <pre><code>ggplot(study_area.map, aes(x=long, y=lat, group=group)) + 
    geom_polygon(aes(fill=brazil_loss_new2)) + 
    geom_path(colour="black") + 
    facet_wrap(~crop, ncol=2, drop=T) + 
    scale_fill_brewer(na.value="grey", palette="Blues", 
      name="Average production lossess\n per municipality", 
      breaks = levels(study_area.map$brazil_loss_new2), 
      labels = levels(study_area.map$brazil_loss_new2)) + 
    theme() + 
    coord_fixed()
  </code></pre>
  
  <p>and this is what I get:</p>
  
  <p><a href="https://i.stack.imgur.com/aT3LL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aT3LL.png" alt="enter image description here"></a></p>
  
  <p>If I use na.omit I get the following figure (which is better, but there are still the NA values missing in the first two plots)</p>
  
  <p><a href="https://i.stack.imgur.com/S3xD3.png" rel="noreferrer">enter image description here</a></p>
  
  <p>Including rows for each variable and municipality no matter if the variable of interest is NA or not, finally solves the problem. Here is what I was looking for:</p>
  
  <p><a href="https://i.stack.imgur.com/0ua4I.png" rel="noreferrer">Yield losses by municipalities with NA values</a></p>