title: Dissolve all polygons but one from a shape file
body: <p>I want to dissolve all polygons but one from a shape file. Is there a way to do this?</p>
  
  <p>Here is a reproducible example:</p>
  
  <pre><code>library(rgeos)
  library(UScensus2000tract)
  
  # load data
    data("oregon.tract")
  
  # plot map
    plot(oregon.tract)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/WE0ta.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WE0ta.jpg" alt="enter image description here"></a></p>
  
  <pre><code># Dissolve all polygons
    d &lt;- gUnaryUnion(oregon.tract, id = oregon.tract@data$state)
    plot(d)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Bz3qq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bz3qq.jpg" alt="enter image description here"></a></p>
  
  <p>In this example, is it possible to dissolve the polygons by keep the tract number 9501 ?</p>