Skip to content

Commit

Permalink
wins3 default works if NA present
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Nov 1, 2016
1 parent 76fa858 commit 223b030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/getwts.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ getwts.default <- function(dat_in, ref_in,
wins_3 <- wins[[3]]

# default window width for third variable is half its range
if(is.null(wins[[3]])) wins_3 <- diff(range(dat_in[, wt_vars[3]]))/2
if(is.null(wins[[3]])) wins_3 <- diff(range(dat_in[, wt_vars[3]], na.rm = TRUE))/2

# return windows if T, for tidal attributes
if(wins_only) return(list(wins_1, wins_2, wins_3))
Expand Down

0 comments on commit 223b030

Please sign in to comment.