Error message fieldInfo_extra

31 views
Skip to first unread message

Martin Gejl

unread,
Apr 3, 2024, 5:57:18 AM4/3/24
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Can anyone help me with this error.
I was trying to run the tutorial and got stuck in the Height measurement
EX1.Shape<- fieldInfo_extra(mosaic = CHVM$newMosaic$height, + fieldShape = EX1.Shape, + fun=mean) [1] "Starting data extraction per plot ..." Error in match(x, table, nomatch = 0L) : 'match' requires vector arguments
Kind regards Martin

Dr P S Pawar

unread,
Apr 3, 2024, 8:12:11 PM4/3/24
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
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
Reply all
Reply to author
Forward
0 new messages