title: Shapefile to raster conversion in R?
body: <p>I have a shapefile downloaded from the worldwildlife.org for the terrestrial ecoregions of the world. The file can be loaded here: <a href="http://worldwildlife.org/publications/terrestrial-ecoregions-of-the-world" rel="nofollow noreferrer">http://worldwildlife.org/publications/terrestrial-ecoregions-of-the-world</a>. </p>
  
  <p>It comes as a standard shape file and I would like to do two things with it. 
  First: take the shapefile from my local directory and clip it to an extent of eastern North America  (ext=  extent (-95, -50, 24, 63)) </p>
  
  <pre><code># Read shapefile using package "maptools"
  eco_shp &lt;- readShapeLines("F:/01_2013/Ecoregions/Global/wwf_terr_ecos.shp", 
                            proj4string=CRS("+proj=utm +zone=33 +datum=WGS84")) 
  
  
  # Set the desired extent for the final raster using package "raster" 
  ext &lt;- extent(-95, -50, 24, 63)
  </code></pre>
  
  <p>I am sure I have to use the rasterize function in the package "raster" but I am still not able to get it work correctly. I would appreciate any suggestions on how to do this.</p>