powered by
Keeps only non-unique rows within a data frame.
duplicates(.data, ..., .keep_all = TRUE)
The original data frame with only non-unique rows.
A data.frame.
Optional variables to use when determining non-uniqueness. If omitted, will use all variables in the data frame.
A flag specifying whether to keep all variables in .data.
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)
Run the code above in your browser using DataLab