title: Zonal statistics in R as in GIS (for a point, not polygon)
body: <p>I have multiple rasters in a folder. I need to extract mean of each of these rasters over a pixel (I do points and note polygons).</p>
  <p>It says extract can be used for points, lines and polygons too.
  BUT for the function (fun = mean). I would like to know by this method, if I must obligatorily do fun='mean' ? Because I have points in my shapefile and not polygon... ?
  The points are on each pixel of my raster</p>
  <p>Can you help me please ?Thank you</p>
  <p>It's here the code I want to do :</p>
  <pre><code>test &lt;- list.files(&quot;my_path&quot;, pattern = &quot;\\.tif$&quot;, full=TRUE)
  STACK &lt;- stack(ff)
  
  SHAPE &lt;- shapefile(&quot;my_path/supplimentY.shp&quot;)
  
  extr &lt;- extract(STACK, SHAPE, *fun='mean'*, na.rm=TRUE, df=TRUE)
  </code></pre>