filter_duplicates: Filter duplicated row by the columns indicated in by

View source: R/filter_duplicates.R

filter_duplicatesR Documentation

Filter duplicated row by the columns indicated in by

Description

Filter duplicated row by the columns indicated in by

Usage

filter_duplicates(data, by)

Arguments

data

a data.frame-like

by

a character vector indicating the columns to consider to identify duplicated rows

Value

a data.table, subset of the original data, containing only duplicated rows by the columns indicated in by, and including an additional column .ndups with the number of duplicated rows for each group. The returned data are sorted by the columns, to be able to inspect the duplicated together

Examples

filter_duplicates(ggplot2::diamonds, by = c("carat", "cut", "price"))

edalfon/efun documentation built on June 23, 2024, 4:17 a.m.