Skip to content

Commit 2b1b524

Browse files
authored
Merge pull request #138 from NOAA-EDAB/fix/i39-herring-na
Fix(#39): remove NAs before type casting
2 parents b94d46e + db0e904 commit 2b1b524

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

R/get_herring_data.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ get_herring_data <- function(
5353

5454
# Convert number fields from character to numeric
5555
herr_catch <- herr_catch |>
56+
dplyr::filter(
57+
!is.na(suppressWarnings(as.numeric(STOCK_AREA))) & !is.na(STOCK_AREA)
58+
) |>
5659
dplyr::mutate(
5760
YEAR = as.numeric(YEAR),
5861
MONTH = as.numeric(MONTH),

0 commit comments

Comments
 (0)