I have a matrix:
A<-t(matrix(
c(0, 0, 1,
0, 0, 0,
0, 0, 1,
0, 0, 1,
0, 0, 0,
1, 1, 0), 3, 6))
and I need to keep columns that appear only once. So, the expected result is just the 3rd column: (1, 0, 1, 1, 0, 0).
I have found the unique and duplicated functions but I need something stronger to delete all columns that appear more than once (in my example the 1st and 2nd).