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
I suppose this might be expected if you truly want to discard all rows with any NA, but that may not always be the case. It would probably make sense for req()/isTruthy() to gain a na.action = na.omit argument to customize the handling of NAs
The text was updated successfully, but these errors were encountered:
cpsievert
changed the title
isTruthy() can return FALSE for character matrices with NA valuesreq()/isTruthy() can give suprising results for matrices (with NAs)
Jul 2, 2024
Some might consider this surprising behavior:
The reason
m
is falsy is thatstats::na.omit()
returns a 0 row matrix:I suppose this might be expected if you truly want to discard all rows with any
NA
, but that may not always be the case. It would probably make sense forreq()
/isTruthy()
to gain ana.action = na.omit
argument to customize the handling ofNA
sThe text was updated successfully, but these errors were encountered: