powered by
Drops duplicated rows
unique_rows(data, cols = NULL, from_last = FALSE, invert = FALSE)
data will duplicates removes
data
A data.frame
data.frame
Columns to compare against; when NULL selects all columns
NULL
When TRUE returns the last row containing duplicates, rather than the first
TRUE
If TRUE returns the duplicated rows
df <- quick_dfl( i = 1:4, a = rep(1:2, 2L), b = rep("a", 4L), ) unique_rows(df, 2:3) unique_rows(df, c("a", "b"), from_last = TRUE, invert = TRUE)
Run the code above in your browser using DataLab