I have a dataframe like this
ID <- c(\"A\",\"A\",\"A\",\"B\",\"B\",\"C\",\"C\") Measurement <- c (\"Length\",\"Breadth\",\"Breadth\",\"Breadth\",\"Leng
Another option is using anyDuplicated
anyDuplicated
df[with(df, ave(as.character(Measurement), ID, FUN = anyDuplicated)!=0),]