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
Hello, first off thank you for this excellent package.
Secondly, this behavior seems inconsistent to me:
library(checkmate)
# Pass
assert_numeric(c(5, NA))
assert_date(c(Sys.Date(), NA))
# Pass
assert_numeric(NA)
assert_character(NA)
assert_integerish(NA)
assert_double(NA)
# Doesn't pass
assert_date(NA)
# Error: Assertion on 'NA' failed: Must be of class 'Date', not 'logical'.
This happens even though they all have the same defaults for any.missing = TRUE. Thoughts? Thanks for your time.
The text was updated successfully, but these errors were encountered:
In your second example, c(Sys.Date(), NA) creates a Date vector, this is why it passes. @mllg Maybe check_date should get a typed.missing argument, too? Also related to #236
Hello, first off thank you for this excellent package.
Secondly, this behavior seems inconsistent to me:
This happens even though they all have the same defaults for
any.missing = TRUE
. Thoughts? Thanks for your time.The text was updated successfully, but these errors were encountered: