if (FALSE) {
df <- data.frame(a = c("A", NA, "B", "C", "C"),
b = c(7, 8, 2, 3, 3),
c = c(NA, 1, NaN, 3, 2),
stringsAsFactors = FALSE)
# Returns FALSE because there is no duplicates
df %>% check_duplicates()
# Returns TRUE because there is duplicates in column a through b
df %>% check_duplicates(a:b)
# Returns FALSE because there is no NA column b
df %>% check_na(b)
# Returns TRUE because there is no NaN column c
df %>% check_nan(c)
}
Run the code above in your browser using DataLab