find_in_df: Special filters

find_in_dfR Documentation

Special filters


Filters a data frame for special cases. For example, find_duplicates() returns all rows that are duplicates. If variables are passed to the function then duplicates for those variables are returned.


find_duplicates(.data, ...)

find_na(.data, ...)

find_irrational(.data, ...)

find_nan(.data, ...)

find_inf(.data, ...)



a data frame


variables that should be considered. If empty, all variables are used.


irrational values are Inf and NaN


a filtered data frame

See Also

vignette("s"), vignette("hablar")

check_df to return TRUE or FALSE instead of rows.


## Not run: 
df <- data.frame(a = c("A", NA, "B", "C", "C"),
                 b = c(NA, 1, 1, 3, 3), 
                 c = c(7, 8, 2, 3, 3), 
                 stringsAsFactors = FALSE)

# Returns duplicated rows
df %>% find_duplicates()

# Returns duplicates in specific variables
df %>% find_duplicates(b:c)

# Returns rows where NA in variable b
df %>% find_na(b)

## End(Not run)

hablar documentation built on March 31, 2023, 11:54 p.m.