Like this:
unique(t(apply(mat, 1, sort)))
Note that output rows are sorted, so for example an "unmatched" row like c(5, 1)
in the original data will appear as c(1, 5)
in the output. If instead you want the output rows to be as they are in the input, then you can do:
mat[!duplicated(t(apply(mat, 1, sort))), ]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…