rmdupobs: Remove duplicate observations from data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rmdupobs.R

Description

Takes in a data, and returns it with duplicate observations removed

Usage

1

Arguments

data

a data.frame or data.table

Details

Duplicate observations are redundant and they need to be removed from the data. rmdupobs does just that; it removes the duplicated observations (the ones in which value of every variable is duplicated) and returns the data with only unique observations.

It works for both 'data.frame' and 'data.table' and returns the data with same class as that of input.

Value

a data of same class as input with only unique observations

Author(s)

Akash Jain

See Also

randomise, rmdupkey, factorise

Examples

1
2
3
4
5
# A 'data.frame'
df <- data.frame(x = c(1, 2, 5, 1), y = c(3, 3, 1, 3))

# Remove duplicate observations from data
dfUnq <- rmdupobs(data = df)

StatMeasures documentation built on May 2, 2019, 1:44 p.m.