rspatial/terra

where.min() problem with negative value present

Closed this issue · 1 comments

create a simple raster in memory and make one negative value then where.min fails to find a result.

library(terra)
v <- volcano; v[1] <- -1
where.min(rast(v))
     layer cell value
Warning message:
In cbind(i, m) :
  number of rows of result is not a multiple of vector length (arg 1)

Thank you, fixed.