Oftentimes our filtering logic involves applying the same logical expression to multiple columns. Implicit filtering allows us to succinctly apply one or more logical expressions to one or more columns and then combine the results without repeating code.
A typical implicit filtering solution looks like so:
df_2 = df %>% filter(if_any(col_1:col_5, is.na))
Implicit filtering involves three aspects:
TRUE
or FALSE
) to apply to each of the selected columns which we cover in Function Specification.