Checking duplicates cross two columns in R [duplicate]
问题 This question already has answers here : Aggregate a data frame based on unordered pairs of columns (3 answers) Closed last year . For example, my data set is like this: Var1 Var2 value 1 ABC BCD 0.5 2 DEF CDE 0.3 3 CDE DEF 0.3 4 BCD ABC 0.5 unique and duplicated may not able to detect the duplication of row 3 and 4. Since my data set is quite large so is there any efficient way to only keep the unique rows? Like this: Var1 Var2 value 1 ABC BCD 0.5 2 DEF CDE 0.3 For your convince, you can use