Checks if columns have unique rows.
Usage
check_key(x, key = character(0), na_distinct = FALSE, x_name = NULL)
See also
Other check:
check_data()
,
check_dim()
,
check_dirs()
,
check_files()
,
check_names()
,
check_values()
Examples
x <- data.frame(x = c(1, 2), y = c(1, 1))
check_key(x)
try(check_key(x, "y"))
#> Error in eval(expr, envir) : Column 'y' in `x` must be a unique key.