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).
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
Can you help me please ?Thank you
It's here the code I want to do :
test <- list.files("my_path", pattern = "\\.tif$", full=TRUE)
STACK <- stack(ff)
SHAPE <- shapefile("my_path/supplimentY.shp")
extr <- extract(STACK, SHAPE, *fun='mean'*, na.rm=TRUE, df=TRUE)