duplicate_eliminate: duplicate_eliminate

Description Usage Arguments Details Value Examples

View source: R/duplicate_eliminate.R

Description

Identifies and eliminates all duplicates including the first instance, if they exist

Usage

1
duplicate_eliminate(data, id_vars, dupout = FALSE, tag = NULL)

Arguments

data

data.frame

id_vars

character vector.

dupout

logical. If FALSE, returns dataset without duplicates. If TRUE, returns duplicates.

Details

h/t Simon O'Hanlon and his Stack Overflow post http://stackoverflow.com/questions/17352657/using-r-how-can-i-flag-sequential-duplicate-values-in-a-single-column-of-a-data

Value

see dupout

Examples

1
2
3
data = data.frame('a'=c(1,1,1,1,2,2,2,2,3), 'b'=c(1,1,2,4,1,2,2,3,1))
duplicate_eliminate(data,c('a','b'))
duplicate_eliminate(data,c('a'))

mfriedri12/fedmatch documentation built on Aug. 4, 2017, 7:41 a.m.