Open PabRod opened 3 years ago
The tests are throwing an error:
Error: Expecting a single value: [extent=0]. Backtrace: 1. makeDataCube::makeMaskNoFire(...) test-Prep_supporting_data.R:127:2 3. (msklc == 1) & (mskfor == 1) 4. e1@ptr$logic_numb(e2, oper, .terra_environment$options@ptr)
The problem happens here:
https://github.com/RETURN-project/makeDataCube/blob/8e6ffdb8d365a917d741d8e1817e9edc1b3644df/R/Prep_supporting_data.R#L497
Only mskfor is a logical object. The other two are SpatRaster objects, and the meaning of expressions such as (msklc == 1) is not obvious and, more worryingly, doesn't evaluate to a logical. Can you shed some light on this, @wandadk?
mskfor
logical
SpatRaster
(msklc == 1)
Thanks in advance!
Problem
The tests are throwing an error:
Some details
The problem happens here:
https://github.com/RETURN-project/makeDataCube/blob/8e6ffdb8d365a917d741d8e1817e9edc1b3644df/R/Prep_supporting_data.R#L497
Only
mskfor
is alogical
object. The other two areSpatRaster
objects, and the meaning of expressions such as(msklc == 1)
is not obvious and, more worryingly, doesn't evaluate to alogical
. Can you shed some light on this, @wandadk?Thanks in advance!