Message-ID: <CAL+ycW=f3cP36-Di+n9TsfhOy3s9Uz2CKP156_LAM7368rQA8A@mail.gmail.com>
Date: 2020-05-28T18:21:52Z
From: Frederico Faleiro
Subject: Comparing 2 rasterbricks using functions from TSdist package
In-Reply-To: <15c924f3-6e16-8502-b204-30a116b7ffed@cirad.fr>
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!
--
Frederico Faleiro
Postdoctoral Researcher in the INCT-EECBio (https://www.eecbio.ufg.br/)
Department of Ecology | Institute of Biological Science | Federal
University of Goi?s | Brazil
RG: https://www.researchgate.net/profile/Frederico_Faleiro
CV: http://lattes.cnpq.br/4926404840659003
[[alternative HTML version deleted]]