diff --git a/R/plot_mgt_harv.R b/R/plot_mgt_harv.R index 52db5c8149b0543c353595f628c030c042517e9b..c4f6a939caa1c00b0c85bdc7e185f873773db29a 100644 --- a/R/plot_mgt_harv.R +++ b/R/plot_mgt_harv.R @@ -275,7 +275,7 @@ prepare_phu <- function(mgt_out, years) { ungroup() %>% filter(year %in% years) - if(any(phu_tbl$date_diff > 1)) { + if(any(phu_tbl$date_diff > 1, na.rm = TRUE)) { crop_diff <- phu_tbl %>% filter(operation == 'KILL') %>% filter(date_diff > 1) %>%