Deleting rows that are duplicated in one column based on the conditions of another column

Lets say you have data in df

df = df[order(df[,'Date'],-df[,'Depth']),]
df = df[!duplicated(df$Date),]

Leave a Comment