I have a dataframe that I need to make it unique based on two columns interchangeably meaning:
dataframe:
df <- data.frame(col1=c("a",1,"bar","foo"),col2=c(1,"a","foo","bar"))
my goal is to keep only one instance of the two rows that contain the same data so, for example, keep foo-bar
or bar-foo
would suffice my need
an output can be: