check_df | R Documentation |
Returns TRUE if data frame have the specified special cases. For example, find_duplicates() returns TRUE if any rows are duplicates. If variables are passed to the function then TRUE or FALSE is returned for those variables.
check_duplicates(.data, ...) check_na(.data, ...) check_irrational(.data, ...) check_nan(.data, ...) check_inf(.data, ...) check_complete_set(.data, ...)
.data |
a data frame |
... |
variables that should be considered. If empty, all variables are used. |
irrational values are Inf and NaN. 'check_complete_set' tests if all combinations of elements exists in the data frame.
TRUE or FALSE
find_in_df
to return rows instead of TRUE or FALSE.
vignette("s")
, vignette("hablar")
## Not run: 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.