duplicates | R Documentation |
Keeps only non-unique rows within a data frame.
duplicates(.data, ..., .keep_all = TRUE)
.data |
A data.frame. |
... |
Optional variables to use when determining non-uniqueness. If omitted, will use all variables in the data frame. |
.keep_all |
A flag specifying whether to keep all variables in .data. |
The original data frame with only non-unique rows.
data <- tibble::tibble(x = c(1, 2, 1, 1), y = c(1, 1, 1, 5))
duplicates(data)
duplicates(data, x)
duplicates(data, y)
duplicates(data, x, y)
duplicates(data, y, .keep_all = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.