View source: R/check_no_duplicate_rows.R
check_no_duplicate_rows | R Documentation |
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)
dataframe |
A dataframe. |
collection |
A list to store the message if there are duplicate rows. |
unique_columns |
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.