I\'ve been thinking this problem for a whole night: here is my matrix:
\'a\' \'#\' 3
\'#\' \'a\' 3
0 \'I am\' 2
\'I am\' 0 2
.....
<
For me, this produced also just a vector of FALSE, meaning that it detected no duplicates. I think this is what happened: I had column names assigned in x. Thus, although order(A) ordered the row neatly and returns the ordered version of the row with column names, the resulting object from lapply respects the column names and hands over to duplicated() a version where the columns are intact (because of the names). Thus, what is considered by duplicated() is the same as x!
I did this inspired by the answer of @A Handcart And Mohair which worked for me:
duplicated(t(apply(x, 1, sort)))
It is also shorter ;)
Note that the example by @A Handcart And Mohair works with his sample data. But if you have named columns, it fails.