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
> assertthat::assert_that(is.numeric("foo") || is.flag("foo"))
Error: "foo" is not a numeric or integer vector or "foo" is not a flag (a length one logical vector).
This is incorrect. The error is that "foo" is not numeric and foo is not a flag. i.e., not(x or y) = not(x) and not(y). Better would be
Error: "foo" is not a numeric or integer vector and "foo" is not a flag (a length one logical vector).
AFAICS, simply replacing "or" with "and" will work. I think that would make error messages clearer. If you agree this is a bug worth fixing, I'll send a pull request.
The text was updated successfully, but these errors were encountered:
hughjonesd
added a commit
to hughjonesd/assertthat
that referenced
this issue
Apr 21, 2023
Example:
This is incorrect. The error is that "foo" is not numeric and foo is not a flag. i.e.,
not(x or y) = not(x) and not(y)
. Better would beAFAICS, simply replacing "or" with "and" will work. I think that would make error messages clearer. If you agree this is a bug worth fixing, I'll send a pull request.
The text was updated successfully, but these errors were encountered: