From aa9bbfe8d7217c7922c8ddf7b824de8924198e05 Mon Sep 17 00:00:00 2001 From: fawda123 Date: Mon, 30 Sep 2024 07:22:47 -0400 Subject: [PATCH] fix warn message and station assignment in anlz_fibmatrix --- R/anlz_fibmatrix.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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] }