Skip to content

Commit

Permalink
r
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Dec 1, 2023
1 parent 226e293 commit 62e09e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/layerCor.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ setMethod("layerCor", signature(x="SpatRaster"),
if (na.rm) {
m <- anyNA(s)
s <- mask(s, m, maskvalue=TRUE)
nij <- n - global(m, fun="sum")$sum
n_ij <- n - global(m, fun="sum")$sum
}
avg <- unlist(global(s, fun="mean", na.rm=na.rm) )
r <- prod(s - avg)
Expand Down

0 comments on commit 62e09e2

Please sign in to comment.