You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using zonal on a raster x that contains NA or NaN values, these are omitted prior to passing x into in custom functions. This does not happen when using built-in functions like fun = "isNA".
Expected behavior
This, to me, is unexpected behavior, as I would expect the vector passed to the custom function to include NA and NaN.
OS/Kernel: Linux 5.15, Ubuntu 20.04, x86_64,
Tested on terra version 1.7.29 (latest version on CRAN) and 1.7.30 (via devtools::install_github("rspatial/terra"))
The issue was reproducible on a Windows machine, too.
The text was updated successfully, but these errors were encountered:
mwip
changed the title
Zonal removing NA/NaN values from x when using custom funzonal removing NA/NaN values from x when using custom funApr 27, 2023
Problem
When using zonal on a raster
x
that containsNA
orNaN
values, these are omitted prior to passing x into in custom functions. This does not happen when using built-in functions likefun = "isNA"
.Expected behavior
This, to me, is unexpected behavior, as I would expect the vector passed to the custom function to include
NA
andNaN
.Example
See this minimal reproducible example:
System details
OS/Kernel: Linux
5.15
, Ubuntu 20.04, x86_64,Tested on terra version
1.7.29
(latest version on CRAN) and1.7.30
(viadevtools::install_github("rspatial/terra")
)The issue was reproducible on a Windows machine, too.
The text was updated successfully, but these errors were encountered: