Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rmdupobs

Remove duplicate observations from data


Description

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

Usage

rmdupobs(data)

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

Examples

# 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

Easy Data Manipulation, Data Quality and Statistical Checks

v1.0
GPL-2
Authors
Akash Jain
Initial release
2015-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.