В Fri, 16 Aug 2024 07:19:38 +0200
SIBYLLE STÖCKLI via R-help <r-help@r-project.org> пишет:

> Is it possible to consider na.rm=TRUE?

> > all.equal(getValues(r1), getValues(r2_resampled), tolerance = 0)  
> 
> [1] "'is.NA' value mismatch: 9544032 in current 66532795 in target"

Use is.na() on getValues() outputs, combine the two masks using the |
operator to get a mask of values that are missing in either raster,
then negate the mask to choose the non-missing values:

all.equal(getValues(r1)[!mask], getValues(r2)[!mask])

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to