-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Hey there,
I'd like to propose to add a parameter to dplyr::filter to specify how NAs are treated in the logical vector.
From the documentation: "Note that when a condition evaluates to NA the row will be dropped, unlike base subsetting with [."
While this is a good default behavior, it would be nice to be able to add, e.g. .treat.nas=T to the function call to emulate base R subsetting in a convenient way.
Use case / reprex: Looking for inconsistencies in data, you sometimes want to show NAs:
tibble(col1 = 1:3, col2 = c(1, 1, NA)) %>% filter(col1 != col2)This call only outputs row 2 but it would be nice to be able to obtain row 3 as well if desired.
Thanks and kind regards,
Mario
Metadata
Metadata
Assignees
Labels
No labels