FindDups: Find duplicated values in a data frame and subset it to...

Description Usage Arguments Value Examples

Description

Find duplicated values in a data frame and subset it to either include or not include them.

Usage

1
FindDups(data, Vars, NotDups = FALSE, test = FALSE, ...)

Arguments

data

a data frame to select the duplicated values from.

Vars

character vector of variables in data to find duplicated values on.

NotDups

logical. If TRUE then a data frame without duplicated values is returned.

test

logical. If TRUE then the function will return an error if there are duplicated values.

...

arguments to pass to duplicated.

Value

a data frame, unless test = TRUE and there are duplicates.

Examples

1
2
3
Data <- data.frame(ID = c(1, 1, 2, 2), Value = c(1, 2, 3, 4))

FindDups(Data, Vars = 'ID')

DataCombine documentation built on May 2, 2019, 11:26 a.m.