title: How to compute the area or number of pixels for selected region in R?
body: <p>I am drawing a region over a raster files but I need to know how many pixels are covered in this box (by means the area):
          the raster file is <code>1440 pixels*720 lines``(25km*25km)</code>.</p>
  
  <p>example:</p>
  
  <pre><code>   saf &lt;- stack(system.file("external/rlogo.grd", package="raster")) 
      plotRGB( saf )
      e &lt;- drawExtent()
  </code></pre>
  
  <p>So after this I drew <code>e</code> as a box but how many pixels/how much is the area?
  Thanks</p>