Hi... We have recently modified the
fieldInfo_extra function. It utilizes the the functionality from
exactextractr r package to extract raster cell values that covered by polygon features. Now the input argument
fun
should be a vector of strings such as c
('mean', 'sum', 'min', 'max', 'summary'). You can use
one of the functions from ('mean', 'sum', 'min', 'max', 'summary').For Example
# Packages:
library(FIELDimageR)
library(FIELDimageR.Extra)
library(terra)
library(mapview)
library(sf)
library(stars)
library(exactextractr)
EX1.Shape<- fieldInfo_extra(mosaic = CHVM$newMosaic$height,fieldShape = EX1.Shape,fun='mean')
fun='mean' and not fun=mean
fun='summary' and not fun=summary
For more details please see the GitHub repository
Hope it helps,
Best Regards,
PS Pawar