Skip to content
Prev 28090 / 29559 Next

Comparing 2 rasterbricks using functions from TSdist package

Hi Jackson,

you could use the complete.cases function to remove the pairs with NA
before run the distance function as bellow.

# CorDistance function does not handle NAs
x <- cbind(as.vector(s[[1]]), as.vector(s2[[1]]))
select.rows <- complete.cases(x)
CorDistance(x[select.rows, ] )

Cheers!