This function is used to check for any duplicated records in a dataset based on the combination of provided columns.
Usage
check_duplicate_records(
.data,
col_names,
stop_message = TRUE,
return_duplicate_record = FALSE,
extra_cols = NULL
)Arguments
- .data
Data.frame
- col_names
Character vector of column names
- stop_message
A Boolean value to return a stop message if there is any duplicated records, Default:
TRUE- return_duplicate_record
A Boolean value to return any duplicated records, Default:
FALSE- extra_cols
Additional columns that will be returned if
stop_messageisFALSE
Value
The same data.frame as input dataset if there is not any duplicated records. Otherwise either an assert stop message or duplicated records.
See also
Other checks function:
check_colnames(),
check_non_missing_value(),
check_object_type(),
check_value_match(),
detect_decimal_value(),
detect_numeric_value(),
is_datadict_tbl()
