Skip to content

Commit

Permalink
lintr with vector logic
Browse files Browse the repository at this point in the history
  • Loading branch information
TanguyBarthelemy committed Jul 9, 2024
1 parent c24c3a3 commit 6383009
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/2_finite_filters.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ finite_filters.moving_average <- function(sfilter,
rfilters = NULL,
lfilters = NULL,
first_to_last = FALSE){
if (is.null(lfilters) & !is.null(rfilters)) {
if (is.null(lfilters) && !is.null(rfilters)) {
if (first_to_last) {
rfilters <- rev(rfilters)
}
lfilters <- rev(lapply(rfilters, rev.moving_average))
} else if (!is.null(lfilters) & is.null(rfilters)) {
} else if (!is.null(lfilters) && is.null(rfilters)) {
if (!first_to_last) {
lfilters <- rev(lfilters)
}
rfilters <- rev(lapply(lfilters, rev.moving_average))
} else if (is.null(lfilters) & is.null(rfilters)) {
} else if (is.null(lfilters) && is.null(rfilters)) {
rfilters <- lfilters <- list()

}
Expand Down
2 changes: 1 addition & 1 deletion R/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ remove_bound_NA <- function(x) {
j <- j + 1
}

if (is.null(remove_i_first) & is.null(remove_i_last)){
if (is.null(remove_i_first) && is.null(remove_i_last)){
# list(data = x, leading = 0,
# trailing = 0)
} else {
Expand Down

0 comments on commit 6383009

Please sign in to comment.