check_no_duplicate_rows.Rd
This function checks if there are any duplicate rows in the provided dataframe. If there are duplicate rows, a message is added to the provided collection.
check_no_duplicate_rows(dataframe, collection, unique_columns = NULL)
A dataframe.
A list to store the message if there are duplicate rows.
Default is NULL. If provided, these are the columns to check for uniqueness.
The updated collection.
# Create a dataframe with some duplicate rows
dataframe <- data.frame(a = c(1, 1, 2), b = c(2, 2, 3))
collection <- checkmate::makeAssertCollection()
check_no_duplicate_rows(dataframe, collection, c("a", "b"))
#> Collection of 1 assertion.