check_key()
accepts a data frame and, optionally, columns.
It throws an error
if the specified columns are NOT a unique key of the data frame.
If the columns given in the ellipsis ARE a key, the data frame itself is returned silently, so that it can be used for piping.
Usage
check_key(x, ..., .data = deprecated())
Arguments
- x
The data frame whose columns should be tested for key properties.
- ...
The names of the columns to be checked, processed with
dplyr::select()
. If omitted, all columns will be checked.- .data
Deprecated.