title: "Error: inherits(obj, "Spatial") is not TRUE"
body: <p>I would like to create contour lines (50%, 75%, 95%) from following raster object (r1) which can be transferred to ArcGIS. But I always getting error message: "Error: inherits(obj, "Spatial") is not TRUE".</p>
  
  <pre><code>contour1 &lt;- contour(r1, levels=c(.5, .75, .95), add=TRUE)
  library(rgdal)
  writeOGR(contour1, ".", paste("r1"), driver="ESRI Shapefile")
  ################ 
  
  
  class       : RasterLayer 
  dimensions  : 703, 524, 368372  (nrow, ncol, ncell)
  resolution  : 10000, 10000  (x, y)
  extent      : -2839438, 2400562, -3450852, 3579148  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=aeqd +ellps=WGS84 +lon_0=89.5525 +lat_0=43.234 
  data source : in memory
  names       : layer 
  values      : 1e-07, 2.888137  (min, max)
  </code></pre>