Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Aug 24, 2023
1 parent 201f622 commit 5a405e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/focal.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function(x, w=3, fun="sum", ..., na.policy="all", fillvalue=NA, expand=FALSE, si

if (is.matrix(w)) {
m <- as.vector(t(w))
if (!all(m %in% c(0, 1, NA))) {
if (isTRUE(list(...)$na.rm)) {
if (txtfun != "sum") {
#if (!all(m %in% c(0, 1, NA))) {
#if (isTRUE(list(...)$na.rm)) {
# if (txtfun != "sum") {
# error("focal", 'with "na.rm=TRUE" and weights other than 0, 1, or NA, only fun="sum" is allowed')
}
}
}
# }
#}
#}
w <- dim(w)
} else {
w <- rep_len(w, 2)
Expand Down

0 comments on commit 5a405e8

Please sign in to comment.