You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filter_pollutants(), filter_categories(), and filter_facilities() should probably issue a warning if the result they return is empty. This will help prevent, or at least diagnose, crashes when evaluating expressions like:
rlang::is_empty(x) seems like a suitable test to use within the body of filter_*(), just before the result is returned. It returns TRUE if x is NULL, and it also returns TRUE if nrow(x) is a zero-length data frame.
One question is whether the warning should be issued when:
verbose is FALSE; or
verbose is not explicitly supplied
... to filter_*().
The text was updated successfully, but these errors were encountered:
dholstius
changed the title
Empty result from filter_*()
Warn if result from filter_*() is empty
Apr 12, 2021
filter_pollutants()
,filter_categories()
, andfilter_facilities()
should probably issue a warning if the result they return is empty. This will help prevent, or at least diagnose, crashes when evaluating expressions like:rlang::is_empty(x)
seems like a suitable test to use within the body offilter_*()
, just before the result is returned. It returnsTRUE
ifx
isNULL
, and it also returnsTRUE
ifnrow(x)
is a zero-length data frame.One question is whether the warning should be issued when:
verbose
isFALSE
; orverbose
is not explicitly supplied... to
filter_*()
.The text was updated successfully, but these errors were encountered: