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
This function could refer to the missing argument to fill in missing values. It works except for when %in% is used in the condition to check.
x<- c(NA, 1,2,3)
# Expected behavior, NA passes through
if_else(x==2, TRUE, FALSE)
# NA is converted to FALSE
if_else(x%in% c(2), TRUE, FALSE)
# NA is converted to FALSE, `missing` argument has no impact
if_else(x%in% c(2), TRUE, FALSE, missing=NA)
The text was updated successfully, but these errors were encountered:
This function could refer to the
missing
argument to fill in missing values. It works except for when%in%
is used in the condition to check.The text was updated successfully, but these errors were encountered: