diff --git a/R/anlz_fibmatrix.R b/R/anlz_fibmatrix.R index a6ce8849..3f05732b 100644 --- a/R/anlz_fibmatrix.R +++ b/R/anlz_fibmatrix.R @@ -189,8 +189,9 @@ anlz_fibmatrix <- function(fibdata, yrrng = NULL, stas = NULL, bay_segment = NUL chk <- !stas %in% stasval # check if some stations valid for lagyr - if(sum(chk) > 0 & sum(chk) < length(chk) & is.null(bay_segment) & warn){ - warning('Stations with insufficient data for lagyr: ', paste(stas[chk], collapse = ', ')) + if(sum(chk) > 0 & sum(chk) < length(chk) & is.null(bay_segment)){ + if(warn) + warning('Stations with insufficient data for lagyr: ', paste(stas[chk], collapse = ', ')) stas <- stas[!chk] }