title: in R, save a shapefile
body: <p>I would like to save a shapefile after a manipulation.</p>
  <p>First, I read my object</p>
  <pre><code>map&lt;-readOGR(&quot;C:/MAPS&quot;,&quot;33SEE250GC_SIR&quot;) 
  </code></pre>
  <p>After this, I subset my shapefile:</p>
  <pre><code>test &lt;- fortify(map, region=&quot;CD_GEOCODI&quot;)
  test&lt;- subset(test, -43.41&lt;long &amp; long &lt; -43.1 &amp; - 23.05&lt;lat &amp; lat&lt; -22.79)
  </code></pre>
  <p>I get the corresponding id's of this subset</p>
  <pre><code>ids&lt;- unique(test$id)
  map2&lt;-  map[map$CD_GEOCODI %in% ids ,]
  </code></pre>
  <p>When I plot the map2, it is all right. But, when I try to save this shapefile, somethinh is wrong</p>
  <pre><code>writeOGR(map2, dsn = &quot;C:/MAPS&quot; , layer = &quot;nameofmynewmap&quot;)
  </code></pre>
  <blockquote>
  <p>Error in match(driver, drvs$name) :
  argument &quot;driver&quot; is missing, with no default</p>
  </blockquote>
  <p>I don't know how to get the drive. Some solution?</p>