I have a data frame in R which looks like:
| RIC | Date | Open |
|--------|---------------------|--------|
| S1A.PA | 2011-06-30 20:00:00
If you want to remove duplicate records based on values of Columns Date and State in dataset data.frame:
#Indexes of the duplicate rows that will be removed:
duplicate_indexes <- which(duplicated(dataset[c('Date', 'State')]),)
duplicate_indexes
#new_uniq will contain unique dataset without the duplicates.
new_uniq <- dataset[!duplicated(dataset[c('Date', 'State')]),]
View(new_uniq)